[FFmpeg-cvslog] r21976 - trunk/libavcodec/h264.c

michael subversion
Tue Feb 23 02:08:54 CET 2010


Author: michael
Date: Tue Feb 23 02:08:54 2010
New Revision: 21976

Log:
Try to set has_b_frames in codec init if we know everything alraedy.
This fixes some issues with the first few timestamps.

Modified:
   trunk/libavcodec/h264.c

Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c	Tue Feb 23 02:07:39 2010	(r21975)
+++ trunk/libavcodec/h264.c	Tue Feb 23 02:08:54 2010	(r21976)
@@ -917,6 +917,10 @@ av_cold int ff_h264_decode_init(AVCodecC
         if(decode_nal_units(h, s->avctx->extradata, s->avctx->extradata_size) < 0)
             return -1;
     }
+    if(h->sps.bitstream_restriction_flag && s->avctx->has_b_frames < h->sps.num_reorder_frames){
+        s->avctx->has_b_frames = h->sps.num_reorder_frames;
+        s->low_delay = 0;
+    }
 
     return 0;
 }



More information about the ffmpeg-cvslog mailing list