Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && !dst->internal->hwaccel_priv_data) failed at libavcodec/pthread_frame.c
A single video causes an abort in ffmpeg-6.1 and ffmpeg-7.0, but happens to work when built with ffmpeg-4.4. It also plays with ffplay-7.0:
Output when revision e5fc9cc4 is built with ffmpeg-4.4 and ffmpeg-7.0:
==> output-ffmpeg-44.txt <==
VLC media player 20240928 Otto Chriek (revision e5fc9cc4be)
[000055cbd0164770] dummy interface: using the dummy interface module...
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[00007fbcd81468b0] vaapi generic error: avcodec_get_hw_frames_parameters failed: -22
==> output-ffmpeg-70.txt <==
VLC media player 20240928 Otto Chriek (revision e5fc9cc4be)
[0000557345da0f20] dummy interface: using the dummy interface module...
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
libva info: VA-API version 1.20.0
libva info: Trying to open /usr/lib64/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_20
libva info: va_openDriver() returns 0
[00007f1df83d17e0] vaapi generic error: avcodec_get_hw_frames_parameters failed: -22
Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && !dst->internal->hwaccel_priv_data) failed at libavcodec/pthread_frame.c:349
Aborted (Speicherabzug geschrieben)
(gdb) bt
#0 __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0)
#1 __pthread_kill_internal (signo=6, threadid=<optimized out>)
#2 __GI_raise (sig=sig@entry=6)
#3 __GI_abort ()
#4 update_context_from_thread (dst=0x7f1e14185b40, src=0x7f1e14538940, for_user=<optimized out>)
#5 submit_packet (avpkt=0x7f1e14185540, user_avctx=0x7f1e140b3400, p=0x7f1e14185540)
#6 ff_thread_decode_frame (avctx=avctx@entry=0x7f1e140b3400, picture=picture@entry=0x7f1e14184c40, got_picture_ptr=got_picture_ptr@entry=0x7f1e385fea6c, avpkt=avpkt@entry=0x7f1e14184ec0)
#7 decode_simple_internal (discarded_samples=0x7f1e385fea70, frame=0x7f1e14184c40, avctx=0x7f1e140b3400)
#8 decode_simple_receive_frame (frame=0x7f1e14184c40, avctx=0x7f1e140b3400)
#9 decode_receive_frame_internal (avctx=avctx@entry=0x7f1e140b3400, frame=0x7f1e14184c40)
#10 avcodec_send_packet (avctx=avctx@entry=0x7f1e140b3400, avpkt=0x7f1df400a300)
#11 DecodeBlock (pp_block=<optimized out>, p_dec=<optimized out>)
#12 DecodeVideo (p_dec=<optimized out>, p_block=<optimized out>)
#13 DecoderThread_DecodeBlock (p_owner=0x7f1e14011e80, frame=0x7f1e14630cd0)
#14 DecoderThread_ProcessInput (p_owner=p_owner@entry=0x7f1e14011e80, frame=<optimized out>)
#15 DecoderThread (p_data=0x7f1e14011e80)
#16 start_thread (arg=<optimized out>)
#17 clone3 ()
In update_context_from_thread, src->hwaccel is NULL, which may contribute to the crash.
The short video can be shared, if needed. mediainfo.txt backtrace-ffmpeg-70.txt