From 09c79d50d88eada370489dac520e127aa56cf841 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20B=C5=93sch?= Date: Fri, 12 Oct 2012 18:23:46 +0200 Subject: [PATCH] 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. --- libavformat/swfdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;