[FFmpeg-cvslog] lavf/swfdec: fix flushing with compressed swf.

Clément Bœsch git at videolan.org
Fri Oct 12 21:53:05 CEST 2012


ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Fri Oct 12 18:23:46 2012 +0200| [0c40220b9dbcff104f38998f7170bdd4b70969cd] | committer: 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.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0c40220b9dbcff104f38998f7170bdd4b70969cd
---

 libavformat/swfdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;



More information about the ffmpeg-cvslog mailing list