]> git.sesse.net Git - ffmpeg/commitdiff
hurry_up fix?
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Sep 2003 00:02:29 +0000 (00:02 +0000)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 27 Sep 2003 00:02:29 +0000 (00:02 +0000)
Originally committed as revision 2306 to svn://svn.ffmpeg.org/ffmpeg/trunk

libavcodec/mpeg12.c

index b92d071503dc8a083d724c37f2591efd2184ca61..b2736163c252f945101c01f688ad7f999d83c821 100644 (file)
@@ -2453,9 +2453,11 @@ static int mpeg_decode_frame(AVCodecContext *avctx,
         /* find start next code */
         start_code = find_start_code(&buf_ptr, buf_end);
         if (start_code < 0){
-            if (slice_end(avctx, picture)) {
-                if(s2->last_picture_ptr) //FIXME merge with the stuff in mpeg_decode_slice
-                    *data_size = sizeof(AVPicture);
+            if(s2->pict_type != B_TYPE || avctx->hurry_up==0){
+                if (slice_end(avctx, picture)) {
+                    if(s2->last_picture_ptr) //FIXME merge with the stuff in mpeg_decode_slice
+                        *data_size = sizeof(AVPicture);
+                }
             }
             return FFMAX(0, buf_ptr - buf - s2->parse_context.last_index);
         }