msdkdec: Release occupied surface for MFX_ERR_MORE_DATA
authorHaihao Xiang <haihao.xiang@intel.com>
Sat, 2 Feb 2019 05:26:32 +0000 (13:26 +0800)
committerHaihao Xiang <haihao.xiang@intel.com>
Sun, 3 Feb 2019 05:44:56 +0000 (13:44 +0800)
commit6c953438f5ad9ab78114bf3d9e5a6e9b1d913b80
tree7e386539183e3416b47d1e707bef202aed08d635
parent1a96759a342878e0cad1e7777fbd6630cca75bc0
msdkdec: Release occupied surface for MFX_ERR_MORE_DATA

An output surface is returned but without sync point when when
MFXVideoDECODE_DecodeFrameAsync () returns MFX_ERR_MORE_DATA, this
surface should be released too, otherwise the surface is occupied
and it is easy to exhaust all pre-allocated mfx surfaces.

Example pipeline (input_vp8.webm contains lots of frame with show_frame
set to 0):

gst-launch-1.0 filesrc location=input_vp8.webm ! matroskademux !
msdkvp8dec ! msdkvpp ! fakesink

0:00:05.995959693 19866 0x563f30f14590 ERROR                default
gstmsdkvideomemory.c:77:gst_msdk_video_allocator_get_surface: failed to
get surface available
ERROR: from element
/GstPipeline:pipeline0/GstMatroskaDemux:matroskademux0: Internal data
stream error.
sys/msdk/gstmsdkdec.c
sys/msdk/gstmsdkdec.h