Crash on seeking in gst_ffmpegviddec_video_frame() in 1.22.5
Describe your issue
When playing multiple videos at once in the same pipeline, seeking is likely to cause an assertion failure and a crash.
Expected Behavior
No crash.
Observed Behavior
ERROR:../ext/libav/gstavviddec.c:1869:gst_ffmpegviddec_video_frame: assertion failed: ((gint) vmeta->width == GST_VIDEO_INFO_WIDTH (info))
Bail out! ERROR:../ext/libav/gstavviddec.c:1869:gst_ffmpegviddec_video_frame: assertion failed: ((gint) vmeta->width == GST_VIDEO_INFO_WIDTH (info))
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:44
#1 0x00007ffff67d68b3 in __pthread_kill_internal (signo=6, threadid=<optimized out>) at pthread_kill.c:78
#2 0x00007ffff6785abe in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3 0x00007ffff676e87f in __GI_abort () at abort.c:79
#4 0x00007ffff7afaf4e in g_assertion_message (domain=domain@entry=0x0, file=file@entry=0x7fffa816922b "../ext/libav/gstavviddec.c", line=line@entry=1869, func=func@entry=0x7fffa816e7e0 <__func__.23> "gst_ffmpegviddec_video_frame", message=message@entry=0x7ffdba27e530 "assertion failed: ((gint) vmeta->width == GST_VIDEO_INFO_WIDTH (info))") at ../glib/gtestutils.c:3450
#5 0x00007ffff7b65527 in g_assertion_message_expr (domain=domain@entry=0x0, file=file@entry=0x7fffa816922b "../ext/libav/gstavviddec.c", line=line@entry=1869, func=func@entry=0x7fffa816e7e0 <__func__.23> "gst_ffmpegviddec_video_frame", expr=expr@entry=0x7fffa816dd18 "(gint) vmeta->width == GST_VIDEO_INFO_WIDTH (info)") at ../glib/gtestutils.c:3476
#6 0x00007fffa815998f in gst_ffmpegviddec_video_frame (ffmpegdec=ffmpegdec@entry=0x7ffdb99b5d20 [GstFFMpegVidDec|avdec_h264-5], frame=frame@entry=0x7ffdb9a04c50, ret=ret@entry=0x7ffd8a7fb33c) at ../ext/libav/gstavviddec.c:1869
#7 0x00007fffa8159e31 in gst_ffmpegviddec_frame (ret=0x7ffd8a7fb33c, frame=<optimized out>, ffmpegdec=0x7ffdb99b5d20 [GstFFMpegVidDec|avdec_h264-5]) at ../ext/libav/gstavviddec.c:2022
#8 gst_ffmpegviddec_handle_frame (decoder=0x7ffdb99b5d20 [GstVideoDecoder|avdec_h264-5], frame=0x7ffdb9a04c50) at ../ext/libav/gstavviddec.c:2164
#9 0x00007ffff7e9f860 in gst_video_decoder_decode_frame (decoder=decoder@entry=0x7ffdb99b5d20 [GstVideoDecoder|avdec_h264-5], frame=frame@entry=0x7ffdb9a04c50) at ../gst-libs/gst/video/gstvideodecoder.c:4010
#10 0x00007ffff7e9fde2 in gst_video_decoder_chain_forward (decoder=decoder@entry=0x7ffdb99b5d20 [GstVideoDecoder|avdec_h264-5], buf=buf@entry=0x7ffdac823db0 [None], at_eos=at_eos@entry=0) at ../gst-libs/gst/video/gstvideodecoder.c:2482
#11 0x00007ffff7ea12cd in gst_video_decoder_chain (pad=pad@entry=0x7ffdb99b6190 [GstPad|sink], parent=parent@entry=0x7ffdb99b5d20 [GstObject|avdec_h264-5], buf=buf@entry=0x7ffdac823db0 [None]) at ../gst-libs/gst/video/gstvideodecoder.c:2824
#12 0x00007ffff7d19e5c in gst_pad_chain_data_unchecked (pad=pad@entry=0x7ffdb99b6190 [GstPad|sink], type=type@entry=4112, data=data@entry=0x7ffdac823db0) at ../gst/gstpad.c:4463
#13 0x00007ffff7d1d1fe in gst_pad_push_data (pad=pad@entry=0x7ffdbc009320 [GstPad|src_0], type=type@entry=4112, data=data@entry=0x7ffdac823db0) at ../gst/gstpad.c:4739
#14 0x00007ffff7d1d834 in gst_pad_push (pad=pad@entry=0x7ffdbc009320 [GstPad|src_0], buffer=buffer@entry=0x7ffdac823db0 [None]) at ../gst/gstpad.c:4858
#15 0x00007fffcc04e184 in gst_single_queue_push_one (allow_drop=<synthetic pointer>, object=0x7ffdac823db0 [None], sq=0x7ffdbc0087c0, mq=<optimized out>) at ../plugins/elements/gstmultiqueue.c:2020
#16 gst_multi_queue_loop (pad=<optimized out>) at ../plugins/elements/gstmultiqueue.c:2358
#17 0x00007ffff7d49ec4 in gst_task_func (task=0x7ffdbc009720 [GstTask|multiqueue10:src_0]) at ../gst/gsttask.c:384
#18 0x00007ffff7b680a2 in g_thread_pool_thread_proxy (data=<optimized out>) at ../glib/gthreadpool.c:350
#19 0x00007ffff7b65983 in g_thread_proxy (data=0x7fffe0007c00) at ../glib/gthread.c:831
#20 0x00007ffff67d4907 in start_thread (arg=<optimized out>) at pthread_create.c:444
#21 0x00007ffff685a870 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
Setup
- Operating System: Fedora 38 Silverblue
- Device: Computer
- GStreamer Version: 1.22.5
- Command line:
Steps to reproduce the bug
It reproduces in Identity from gnome-nightly, which has GStreamer 1.22.5. It also reproduces if I build it on Fedora 38 directly.
flatpak remote-add --user --if-not-exists gnome-nightly https://nightly.gnome.org/gnome-nightly.flatpakrepo
flatpak install --user org.gnome.gitlab.YaLTeR.Identity.Devel
flatpak run org.gnome.gitlab.YaLTeR.Identity.Devel
- Open this mp4 several times (I open it 9 times, that's more than enough)
- Drag the seeking bar at the bottom around a bit
How reproducible is the bug?
Very easy to reproduce.
Screenshots if relevant
Solutions you have tried
Related non-duplicate issues
Additional Information
In GStreamer 1.20 (current stable Identity on GNOME Platform 44) this crash does not happen.