Commit 0c40220b authored by Clément Bœsch's avatar Clément Bœsch

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.
parent b8d64559
...@@ -71,7 +71,7 @@ static int zlib_refill(void *opaque, uint8_t *buf, int buf_size) ...@@ -71,7 +71,7 @@ static int zlib_refill(void *opaque, uint8_t *buf, int buf_size)
retry: retry:
if (!z->avail_in) { if (!z->avail_in) {
int n = avio_read(s->pb, swf->zbuf_in, ZBUF_SIZE); int n = avio_read(s->pb, swf->zbuf_in, ZBUF_SIZE);
if (n <= 0) if (n < 0)
return n; return n;
z->next_in = swf->zbuf_in; z->next_in = swf->zbuf_in;
z->avail_in = n; z->avail_in = n;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment