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:
Seungha Yang 2021-06-16 01:07:09 +09:00 committed by GStreamer Marge Bot
parent 162e7bd28b
commit b5b13a6f5c

View file

@ -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;
}