diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-10-12 18:23:46 +0200 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-10-12 21:59:06 +0200 |
commit | 0c40220b9dbcff104f38998f7170bdd4b70969cd (patch) | |
tree | ca321b03c862bfe91dbe880859e08f73f569f927 /libavformat/swfdec.c | |
parent | b8d64559d5dd5a47dc2897c82a61c02c4c5ca094 (diff) | |
download | ffmpeg-0c40220b9dbcff104f38998f7170bdd4b70969cd.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.
Diffstat (limited to 'libavformat/swfdec.c')
-rw-r--r-- | libavformat/swfdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 8a57a34d04..8ef24a5ae5 100644 --- a/libavformat/swfdec.c +++ b/libavformat/swfdec.c @@ -71,7 +71,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; |