avdec_h264 pipeline freeze with FFmpeg6
Hi,
While debugging a pipeline blocking issue for a complex gstreamer pipeline I reduced the pipeline to the bare minimum and found out that the following pipeline sometime freeze (20%):
gst-launch-1.0 filesrc location=raw.h264 ! h264parse ! avdec_h264 max-threads=2 ! fakesink --gst-debug=3
Note that everything goes well if I use max-threads=1
, this lead me to suspect recent FFmpeg 5->6 change on my distribution (archlinux), and for that I make a docker image with archlinux:lastest and FFmpeg 5 (from archlinux archive) + manually compile GStreamer 1.22.1 with this FFmpeg and noted that the bug does not occurs on this config
Here attached avdec_h264_ffmpeg6.tgz is a simple archive containing docker image for both ffmpeg6 and FFmpeg5 and GStreamer 1.22 that show how to reproduce (see README.rst)
Apart from docker I also reproduced the issue locally on archlinux and I also attach the backtrace gdb.txt (collected with GDB on the hanging process) at first sight it seems like a deadlock in FFmpeg worker ?
At this time I also check to reproduce the issue with FFmpeg while true; do ffmpeg -y -f h264 -i raw.h264 -threads 16 -f rawvideo foo.raw; sleep .5; done
but without success... I also did not found any issue related to this on FFmpeg bug tracker
Any ideas ?