omxvideoenc: prevent a NULL pointer access

This commit is contained in:
Josep Torra 2013-02-27 10:21:39 +01:00
parent 3973425689
commit b85358aff7

View file

@ -601,6 +601,13 @@ _find_nearest_frame (GstOMXVideoEnc * self, GstOMXBuffer * buf)
BufferIdentification *id = gst_video_codec_frame_get_user_data (tmp);
guint64 diff_ticks, diff_frames;
/* This happens for frames that were just added but
* which were not passed to the component yet. Ignore
* them here!
*/
if (!id)
continue;
if (id->timestamp > best_timestamp)
break;