decode: All pipelines fail with "double free or corruption"
For any decoding in gst-vaapi, we get a double free or corruption with recent intel-media-driver (iHD) commit (see below). I'm filing this issue here since it is not clear, yet, which component is to blame and because neither gstreamer-msdk, ffmpeg-vaapi nor ffmpeg-qsv exhibit this problem (i.e. they all succeed). This needs to be debugged and root-caused further to determine blame. I have attached a gdb backtrace and the valgrind errors below.
gst-launch-1.0 -vf videotestsrc num-buffers=100 ! vaapih264enc \ ! h264parse ! vaapih264dec ! fakesink Setting pipeline to PAUSED ... Pipeline is PREROLLING ... Got context from element 'vaapiencodeh264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx0"; double free or corruption (!prev) Aborted (core dumped)
This started happening since intel-media-driver commit ebc16f89affb. Prior to this commit, there is no issue.
ebc16f89affb110bd8d15c1ad28ed824ad8f13b8 is the first bad commit commit ebc16f89affb110bd8d15c1ad28ed824ad8f13b8 Author: Wang_PengX <firstname.lastname@example.org> Date: Fri Feb 28 05:13:10 2020 +0800 [VP] Use TileY on VP write to improve performance Use TileY on VP write to improve performance on linux Change-Id: Ief060deada57574ba3b1e26404e46ac4c8f5ac27
My current software stack:
libva (master) heads/master-0-g48f446b32a4f gmmlib (master) heads/master-0-g879f3044c4bd intel-media-driver (master) heads/master-0-gebc16f89affb msdk (master) heads/master-0-g9890dff6064a ffmpeg (master) heads/master-0-g31ecfa95fbb6 gstreamer (master) heads/master-0-gef0df31c5e6f gst-plugins-base (master) heads/master-0-ga12f16172483 gst-plugins-good (master) heads/master-0-g42e7864e90ce gst-plugins-bad (master) heads/master-0-g9575d835ba52 gstreamer-vaapi (master) heads/master-0-ga8031bcb0e34