[FFmpeg-devel] API breakage by r9870

Stefan Lucke stefan
Fri Oct 5 13:06:47 CEST 2007


Hi,

I think 2nd part of above change 
http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/mpeg12.c?view=diff&r1=9869&r2=9870

breaks api because this from from libavcodec/apiexample.c will loop
when there is a trailing stop sequence (size == 4) .

        while (size > 0) {
            len = avcodec_decode_video(c, picture, &got_picture,
                                       inbuf_ptr, size);


Attached patch fixes this.

-- 
Stefan Lucke
-------------- next part --------------
Index: libavcodec/mpeg12.c
===================================================================
--- libavcodec/mpeg12.c	(Revision 10657)
+++ libavcodec/mpeg12.c	(Arbeitskopie)
@@ -2239,7 +2239,7 @@
 
             *data_size = sizeof(AVFrame);
         }
-        return 0;
+        return buf_size;
     }
 
     if(s2->flags&CODEC_FLAG_TRUNCATED){



More information about the ffmpeg-devel mailing list