afh.c: Skip emtpy chunks.
authorAndre Noll <maan@systemlinux.org>
Fri, 28 Nov 2008 20:02:26 +0000 (21:02 +0100)
committerAndre Noll <maan@systemlinux.org>
Fri, 28 Nov 2008 20:02:26 +0000 (21:02 +0100)
afh.c

diff --git a/afh.c b/afh.c
index 8632242..c82d17f 100644 (file)
--- a/afh.c
+++ b/afh.c
@@ -112,6 +112,8 @@ static int cat_file(void *audio_file_data, struct afh_info *afhi)
                                        return ret;
                        }
                }
+               if (!size)
+                       continue;
                PARA_INFO_LOG("writing chunk %lu\n", i);
                ret = write_all(STDOUT_FILENO, buf, &size);
                if (ret < 0)