omxvideodec: Make sure that the first frame we pass to OpenMAX is a sync frame
authorSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 15 Mar 2013 13:09:45 +0000 (14:09 +0100)
committerSebastian Dröge <sebastian.droege@collabora.co.uk>
Fri, 15 Mar 2013 13:09:45 +0000 (14:09 +0100)
omx/gstomxvideodec.c

index 6e8d139..be7e1f8 100644 (file)
@@ -2200,6 +2200,11 @@ gst_omx_video_dec_handle_frame (GstVideoDecoder * decoder,
     return GST_FLOW_EOS;
   }
 
+  if (!self->started && !GST_VIDEO_CODEC_FRAME_IS_SYNC_POINT (frame)) {
+    gst_video_decoder_drop_frame (GST_VIDEO_DECODER (self), frame);
+    return GST_FLOW_OK;
+  }
+
   timestamp = frame->pts;
   duration = frame->duration;