From 0c40220b9dbcff104f38998f7170bdd4b70969cd 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: 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(-) (limited to 'libavformat') diff --git a/libavformat/swfdec.c b/libavformat/swfdec.c index 8a57a34..8ef24a5 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; -- cgit v1.1