mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
h264decoder: Fix GstVideoCodecFrame leak
If current buffer has no slice data, frame should be released. Otherwise frames will stay in decoder baseclass forever. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5693>
This commit is contained in:
parent
e33d5303f7
commit
ccf6ac2b4c
1 changed files with 9 additions and 1 deletions
|
@ -1878,8 +1878,16 @@ gst_h264_decoder_finish_current_picture (GstH264Decoder * self,
|
|||
GstH264DecoderClass *klass;
|
||||
GstFlowReturn flow_ret = GST_FLOW_OK;
|
||||
|
||||
if (!priv->current_picture)
|
||||
if (!priv->current_picture) {
|
||||
if (priv->current_frame) {
|
||||
GST_DEBUG_OBJECT (self,
|
||||
"AU buffer without slice data, releasing current frame %u",
|
||||
priv->current_frame->system_frame_number);
|
||||
gst_video_decoder_release_frame (GST_VIDEO_DECODER_CAST (self),
|
||||
gst_video_codec_frame_ref (priv->current_frame));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
klass = GST_H264_DECODER_GET_CLASS (self);
|
||||
|
||||
|
|
Loading…
Reference in a new issue