mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-08 00:59:48 +00:00
msdkdec: release the surface if this surface is not in use
If the surface is not in use, we may release it even if GST_FLOW_OK is going
to be returned, which may avoid the issue of failing to get surface
available
This fixes the regression caused by commit c05acf4
This commit is contained in:
parent
8daac1c09a
commit
c689c94458
1 changed files with 5 additions and 1 deletions
|
@ -1067,7 +1067,11 @@ gst_msdkdec_handle_frame (GstVideoDecoder * decoder, GstVideoCodecFrame * frame)
|
|||
|
||||
if (bitstream.DataLength == 0) {
|
||||
flow = GST_FLOW_OK;
|
||||
surface = NULL;
|
||||
|
||||
/* Don't release it if the current surface is in use */
|
||||
if (surface && task->surface == surface->surface)
|
||||
surface = NULL;
|
||||
|
||||
break;
|
||||
}
|
||||
} else if (status == MFX_ERR_MORE_DATA) {
|
||||
|
|
Loading…
Reference in a new issue