summaryrefslogtreecommitdiff
path: root/omx
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2017-09-13 15:32:51 +0200
committerTim-Philipp Müller <tim@centricular.com>2017-09-14 17:39:06 +0100
commit1bc6976b7b8c11ad9dc47fa5a6333f6bc6cddd81 (patch)
treed7a17392422af004697de74b787383617835b180 /omx
parentf905af8d8ecf1e8ac44eaf7040a7cc5fafd18fa7 (diff)
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
Diffstat (limited to 'omx')
-rw-r--r--omx/gstomxvideodec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/omx/gstomxvideodec.c b/omx/gstomxvideodec.c
index fe4f337688..c98905d979 100644
--- a/omx/gstomxvideodec.c
+++ b/omx/gstomxvideodec.c
@@ -1355,11 +1355,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);
}
@@ -1371,11 +1371,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);
}