From 3973425689a78836609ad41ca443dbfc2c5e39f1 Mon Sep 17 00:00:00 2001 From: Josep Torra Date: Tue, 26 Feb 2013 17:25:49 +0100 Subject: [PATCH] omxvideodec: prevent a NULL pointer access --- omx/gstomxvideodec.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 9a78463d58..297753aa6b 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -359,6 +359,13 @@ _find_nearest_frame (GstOMXVideoDec * 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;