mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +00:00
h265decoder: Don't hold reference to GstVideoCodecFrame for dropped picture
We are dropping RASL (Random Access Skipped Leading picture) which is associated with an IRAP (Intra Random Access Picture) that has NoRaslOutputFlag equal to 1, since the RASL picture will not be outputted and also it should not be used for reference picture. So, corresponding GstVideoCodecFrame should be released immediately. Otherwise GstVideoDecoder baseclass will hold the unused frame. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2330>
This commit is contained in:
parent
162e7bd28b
commit
b5b13a6f5c
1 changed files with 7 additions and 2 deletions
|
@ -1750,8 +1750,13 @@ gst_h265_decoder_handle_frame (GstVideoDecoder * decoder,
|
|||
return priv->last_ret;
|
||||
}
|
||||
|
||||
gst_h265_decoder_finish_current_picture (self);
|
||||
gst_video_codec_frame_unref (frame);
|
||||
if (priv->current_picture) {
|
||||
gst_h265_decoder_finish_current_picture (self);
|
||||
gst_video_codec_frame_unref (frame);
|
||||
} else {
|
||||
/* This picture was dropped */
|
||||
gst_video_decoder_release_frame (decoder, frame);
|
||||
}
|
||||
|
||||
return priv->last_ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue