mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
vaapidecode: submit all decoded frames before decoding a new one.
Make sure to purge all pending frames that were already decoded prior to decoding a new one. This helps release VA surfaces as early as possible.
This commit is contained in:
parent
ead7ec2f43
commit
1ed3df201e
1 changed files with 8 additions and 0 deletions
|
@ -351,9 +351,17 @@ gst_vaapidecode_handle_frame(GstVideoDecoder *vdec, GstVideoCodecFrame *frame)
|
|||
{
|
||||
GstFlowReturn ret;
|
||||
|
||||
/* Purge all pending frames we might have already. This helps
|
||||
release VA surfaces as early as possible for _decode_frame() */
|
||||
ret = gst_vaapidecode_push_decoded_frames(vdec);
|
||||
if (ret != GST_FLOW_OK)
|
||||
return ret;
|
||||
|
||||
ret = gst_vaapidecode_decode_frame(vdec, frame);
|
||||
if (ret != GST_FLOW_OK)
|
||||
return ret;
|
||||
|
||||
/* Purge any pending frame thay may have been decoded already */
|
||||
return gst_vaapidecode_push_decoded_frames(vdec);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue