h264parse: do wait for a keyframe when handling force key unit events
authorAlessandro Decina <alessandro.d@gmail.com>
Sun, 18 Dec 2011 16:40:57 +0000 (17:40 +0100)
committerAlessandro Decina <alessandro.d@gmail.com>
Sun, 18 Dec 2011 16:40:57 +0000 (17:40 +0100)
Although some decoders can start decoding with just PPS and SPS and waiting for
a keyframe is bad when the keyframe interval is large, gst-ffmpeg does need a
keyframe to start decoding.

gst/videoparsers/gsth264parse.c

index 20c59a3..40e414e 100644 (file)
@@ -1276,12 +1276,10 @@ check_pending_key_unit_event (GstEvent * pending_event, GstSegment * segment,
       running_time < pending_key_unit_ts)
     goto out;
 
-#if 0
   if (flags & GST_BUFFER_FLAG_DELTA_UNIT) {
     GST_DEBUG ("pending force key unit, waiting for keyframe");
     goto out;
   }
-#endif
 
   stream_time = gst_segment_to_stream_time (segment,
       GST_FORMAT_TIME, timestamp);