diff options
author | Clément Bœsch <ubitux@gmail.com> | 2012-10-12 20:23:46 +0400 |
---|---|---|
committer | Clément Bœsch <ubitux@gmail.com> | 2012-10-12 23:59:06 +0400 |
commit | 0c40220b9dbcff104f38998f7170bdd4b70969cd (patch) | |
tree | ca321b03c862bfe91dbe880859e08f73f569f927 /libavformat | |
parent | b8d64559d5dd5a47dc2897c82a61c02c4c5ca094 (diff) |
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')
-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; |