From ed8f8175d7449ba686f6e2cf27cd969af25f9e9f Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Wed, 13 Sep 2017 15:32:51 +0200 Subject: omxvideodec: log info about frame before releasing it gst_video_decoder_release_frame() takes ownership of the frame and will destroy it. So we should no longer use it after calling it. https://bugzilla.gnome.org/show_bug.cgi?id=787628 --- omx/gstomxvideodec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c index 79b4daa..b5fe90e 100644 --- a/omx/gstomxvideodec.c +++ b/omx/gstomxvideodec.c @@ -1189,11 +1189,11 @@ gst_omx_video_dec_clean_older_frames (GstOMXVideoDec * self, GstVideoCodecFrame *tmp = l->data; if (tmp->pts < timestamp) { - gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp); GST_LOG_OBJECT (self, "discarding ghost frame %p (#%d) PTS:%" GST_TIME_FORMAT " DTS:%" GST_TIME_FORMAT, tmp, tmp->system_frame_number, GST_TIME_ARGS (tmp->pts), GST_TIME_ARGS (tmp->dts)); + gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp); } else { gst_video_codec_frame_unref (tmp); } @@ -1205,11 +1205,11 @@ gst_omx_video_dec_clean_older_frames (GstOMXVideoDec * self, GstVideoCodecFrame *tmp = l->data; if (!GST_CLOCK_TIME_IS_VALID (tmp->pts)) { - gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp); GST_LOG_OBJECT (self, "discarding frame %p (#%d) with invalid PTS:%" GST_TIME_FORMAT " DTS:%" GST_TIME_FORMAT, tmp, tmp->system_frame_number, GST_TIME_ARGS (tmp->pts), GST_TIME_ARGS (tmp->dts)); + gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp); } else { gst_video_codec_frame_unref (tmp); } -- cgit v1.2.1