mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-14 10:15:48 +00:00
omxvideoenc: prevent a NULL pointer access
This commit is contained in:
parent
3973425689
commit
b85358aff7
1 changed files with 7 additions and 0 deletions
|
@ -601,6 +601,13 @@ _find_nearest_frame (GstOMXVideoEnc * self, GstOMXBuffer * buf)
|
||||||
BufferIdentification *id = gst_video_codec_frame_get_user_data (tmp);
|
BufferIdentification *id = gst_video_codec_frame_get_user_data (tmp);
|
||||||
guint64 diff_ticks, diff_frames;
|
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)
|
if (id->timestamp > best_timestamp)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue