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.
This commit is contained in:
Clément Bœsch 2012-10-12 18:23:46 +02:00
parent b8d64559d5
commit 0c40220b9d

View File

@ -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;