Prevent infinite loop when buffer holds SEQ_END_CODE only. Fix for r9870
authorStefan Lucke <stefan@lucke.in-berlin.de>
Sat, 13 Oct 2007 01:34:00 +0000 (01:34 +0000)
committerRamiro Polla <ramiro.polla@gmail.com>
Sat, 13 Oct 2007 01:34:00 +0000 (01:34 +0000)
Patch by Stefan Lucke <stefan <at> lucke.in-berlin.de>
Subject: API breakage by r9870
Date: 2007-10-05 11:06:47 GMT
http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/57467

Originally committed as revision 10720 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mpeg12.c

index 89793a5794401d39c63771c10c210b3e80fb6811..ed7409157a7640cc5f79e5999d0a1a5f4dfb4644 100644 (file)
@@ -2239,7 +2239,7 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
 
             *data_size = sizeof(AVFrame);
         }
-        return 0;
+        return buf_size;
     }
 
     if(s2->flags&CODEC_FLAG_TRUNCATED){