msdkdec: avoid infinite loop
authorHaihao Xiang <haihao.xiang@intel.com>
Wed, 6 Mar 2019 05:07:53 +0000 (13:07 +0800)
committerTim-Philipp Müller <tim@centricular.com>
Mon, 25 Mar 2019 09:10:38 +0000 (09:10 +0000)
commit28a1b0c41889102d5017a309ec1c232b5fbbdbac
treeed353b07fab5386df4220d42c39f0725a4cfc9b5
parent35cdefe2e05a6760aef366fcb1acaf9ca043982a
msdkdec: avoid infinite loop

It is possible MFXVideoDECODE_DecodeFrameAsync returns MFX_ERR_INCOMPATIBLE_VIDEO_PARAM
and this error can't be recovered by retrying MFXVideoDECODE_DecodeFrameAsync
in some cases, so we need to limit the number of retries to avoid infinite loop.

This fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/909
sys/msdk/gstmsdkdec.c