diff options
author | Seungha Yang <seungha@centricular.com> | 2021-06-16 01:07:09 +0900 |
---|---|---|
committer | GStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2021-07-01 14:10:30 +0000 |
commit | b5b13a6f5c6f7e878c7b86a953694c8033c09c01 (patch) | |
tree | c082496a77b64597509ad0885a23ae14827820a3 /gst-libs | |
parent | 162e7bd28b19bac786228ec3ab7fd4ea9238cac2 (diff) | |
download | gstreamer-plugins-bad-b5b13a6f5c6f7e878c7b86a953694c8033c09c01.tar.gz |
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>
Diffstat (limited to 'gst-libs')
-rw-r--r-- | gst-libs/gst/codecs/gsth265decoder.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/gst-libs/gst/codecs/gsth265decoder.c b/gst-libs/gst/codecs/gsth265decoder.c index dc8240fc5..7b33349a3 100644 --- a/gst-libs/gst/codecs/gsth265decoder.c +++ b/gst-libs/gst/codecs/gsth265decoder.c @@ -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; } |