diff mpegvideo.c @ 365:fdeec2834c79 libavcodec

there are divx5? encoded files without a userdata section but with b-frames :(
author michaelni
date Mon, 06 May 2002 13:15:05 +0000
parents 6ebbecc10063
children 0eca28d16cbd
line wrap: on
line diff
--- a/mpegvideo.c	Sun May 05 19:03:24 2002 +0000
+++ b/mpegvideo.c	Mon May 06 13:15:05 2002 +0000
@@ -159,7 +159,9 @@
         s->next_picture_base[i] = pict;
         s->next_picture[i] = pict + pict_start;
         
-        if (s->has_b_frames) {
+        if (s->has_b_frames || s->codec_id==CODEC_ID_MPEG4) {
+        /* Note the MPEG4 stuff is here cuz of buggy encoders which dont set the low_delay flag but 
+           do low-delay encoding, so we cant allways distinguish b-frame containing streams from low_delay streams */
             pict = av_mallocz(c_size);
             if (pict == NULL) 
                 goto fail;