Merge branch 't/alsa_poll_fd'
authorAndre Noll <maan@systemlinux.org>
Thu, 18 Aug 2011 13:19:41 +0000 (15:19 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 18 Aug 2011 13:21:05 +0000 (15:21 +0200)
NEWS
crypt.c
mp3_afh.c

diff --git a/NEWS b/NEWS
index 40c30bf..05c866b 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -20,6 +20,7 @@ are the highlights of this release.
          tarballs. This reduces the size of the tarballs but requires
          gengetopt to build the tarball.
        - Compiles cleanly also with llvm/clang.
+       - The alsa writer used poll fds instead of computing timeouts.
        - Corrupt mp3 files are handled more gracefully.
        - sched: Optimized zero timeouts.
        - vss timeout cleanups.
diff --git a/crypt.c b/crypt.c
index f064fb3..5b7029d 100644 (file)
--- a/crypt.c
+++ b/crypt.c
@@ -204,7 +204,7 @@ out:
                ret = ret2;
        if (ret < 0) {
                free(key);
-               result = NULL;
+               *result = NULL;
                PARA_ERROR_LOG("key %s: %s\n", key_file, para_strerror(-ret));
        } else
                *result = key;
index b83343e..b0d44ec 100644 (file)
--- a/mp3_afh.c
+++ b/mp3_afh.c
@@ -420,7 +420,7 @@ static int mp3_read_info(unsigned char *map, size_t numbytes, int fd,
                if (ret < 0)
                        continue;
                fl = ret;
-               tmp.tv_sec = fl;
+               tmp.tv_sec = fl - header.padding;
                tmp.tv_usec = 0;
                tv_divide(br * 125, &tmp, &cct);
                tv_add(&cct, &total_time, &tmp);