mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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
This commit is contained in:
parent
f905af8d8e
commit
1bc6976b7b
1 changed files with 2 additions and 2 deletions
|
@ -1355,11 +1355,11 @@ gst_omx_video_dec_clean_older_frames (GstOMXVideoDec * self,
|
||||||
GstVideoCodecFrame *tmp = l->data;
|
GstVideoCodecFrame *tmp = l->data;
|
||||||
|
|
||||||
if (tmp->pts < timestamp) {
|
if (tmp->pts < timestamp) {
|
||||||
gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp);
|
|
||||||
GST_LOG_OBJECT (self,
|
GST_LOG_OBJECT (self,
|
||||||
"discarding ghost frame %p (#%d) PTS:%" GST_TIME_FORMAT " DTS:%"
|
"discarding ghost frame %p (#%d) PTS:%" GST_TIME_FORMAT " DTS:%"
|
||||||
GST_TIME_FORMAT, tmp, tmp->system_frame_number,
|
GST_TIME_FORMAT, tmp, tmp->system_frame_number,
|
||||||
GST_TIME_ARGS (tmp->pts), GST_TIME_ARGS (tmp->dts));
|
GST_TIME_ARGS (tmp->pts), GST_TIME_ARGS (tmp->dts));
|
||||||
|
gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp);
|
||||||
} else {
|
} else {
|
||||||
gst_video_codec_frame_unref (tmp);
|
gst_video_codec_frame_unref (tmp);
|
||||||
}
|
}
|
||||||
|
@ -1371,11 +1371,11 @@ gst_omx_video_dec_clean_older_frames (GstOMXVideoDec * self,
|
||||||
GstVideoCodecFrame *tmp = l->data;
|
GstVideoCodecFrame *tmp = l->data;
|
||||||
|
|
||||||
if (!GST_CLOCK_TIME_IS_VALID (tmp->pts)) {
|
if (!GST_CLOCK_TIME_IS_VALID (tmp->pts)) {
|
||||||
gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp);
|
|
||||||
GST_LOG_OBJECT (self,
|
GST_LOG_OBJECT (self,
|
||||||
"discarding frame %p (#%d) with invalid PTS:%" GST_TIME_FORMAT
|
"discarding frame %p (#%d) with invalid PTS:%" GST_TIME_FORMAT
|
||||||
" DTS:%" GST_TIME_FORMAT, tmp, tmp->system_frame_number,
|
" DTS:%" GST_TIME_FORMAT, tmp, tmp->system_frame_number,
|
||||||
GST_TIME_ARGS (tmp->pts), GST_TIME_ARGS (tmp->dts));
|
GST_TIME_ARGS (tmp->pts), GST_TIME_ARGS (tmp->dts));
|
||||||
|
gst_video_decoder_release_frame (GST_VIDEO_DECODER (self), tmp);
|
||||||
} else {
|
} else {
|
||||||
gst_video_codec_frame_unref (tmp);
|
gst_video_codec_frame_unref (tmp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue