aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2012-10-12 18:23:46 +0200
committerClément Bœsch <ubitux@gmail.com>2012-12-03 16:40:17 +0100
commit09c79d50d88eada370489dac520e127aa56cf841 (patch)
tree1e0b21de8c36afa9adaea8c6751ab5e25ee1d435
parenta74f292d4ab3e800853c3ab7536418e6eb584b27 (diff)
downloadffmpeg-09c79d50d88eada370489dac520e127aa56cf841.tar.gz
lavf/swfdec: fix flushing with compressed swf.
We now only return in the middle of the refill in case of read error, so inflate can be re-called if zlib needs an empty (z.avail_in=0) inflate call for flushing.
-rw-r--r--libavformat/swfdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c
index 86ea6dec9e..6136b54b05 100644
--- a/libavformat/swfdec.c
+++ b/libavformat/swfdec.c
@@ -72,7 +72,7 @@ static int zlib_refill(void *opaque, uint8_t *buf, int buf_size)
retry:
if (!z->avail_in) {
int n = avio_read(s->pb, swf->zbuf_in, ZBUF_SIZE);
- if (n <= 0)
+ if (n < 0)
return n;
z->next_in = swf->zbuf_in;
z->avail_in = n;