msdk: infinite run/loop with vc1 decode and OOM
The following vc1 input files to gst msdk vc1 decode cause the program to run forever until it eventually depletes all system memory:
SA10104.vc1
SA10106.vc1
SA10108.vc1
SA10110.vc1
SA10120.vc1
SA10131.vc1
This started with the following commit:
commit 18d410b81a5d18703c19898dd5d8ec132c6bbb5a
Author: Haihao Xiang <haihao.xiang@intel.com>
Date: Wed Feb 27 08:07:29 2019 +0800
msdkdec: fix for resolution change
Returning MFX_ERR_INCOMPATIBLE_VIDEO_PARAM from
MFXVideoDECODE_DecodeFrameAsync means the allocated mfx surface is not
suitable for the current frame, we need a new mfx surface and try
MFXVideoDECODE_DecodeFrameAsync again.
Prior to this commit, these inputs would just cause the pipeline to fail (or seg fault).
Command:
LIBVA_DRIVER_NAME=iHD gst-launch-1.0 -vf filesrc location=./vc1/SA10104.vc1 \
! 'video/x-wmv,profile=(string)advanced',width=720,height=480,framerate=14/1 \
! msdkvc1dec ! videoconvert ! video/x-raw,format=I420 \
! checksumsink2 file-checksum=false frame-checksum=false plane-checksum=false \
dump-output=true qos=false dump-location=output.yuv
FYI: You can find some of these input files on https://trac.ffmpeg.org/ticket/7405
Edited by U. Artie Eoff