#10697 closed defect (invalid)

Crash when using incompatible codec and hardware acceleration type

Reported by: iEvgeny Owned by:
Priority: normal Component: ffmpeg
Version: git-master Keywords: ffmpeg avcodec hwaccel qsv
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Attempting to use an incompatible VAAPI hardware device and QSV codec causes FFmpeg to crash.

How to reproduce:

% ffmpeg -hwaccel vaapi -c:v h264_qsv -i rtmp://live.a71.ru/demo/0 -f null -

Output:

ffmpeg version N-112838-g7212466e73 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: --prefix=/home/evgeny/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/evgeny/ffmpeg_build/include --extra-ldflags=-L/home/evgeny/ffmpeg_build/lib --extra-libs='-lpthread -lm' --ld=g++ --bindir=/home/evgeny/bin --enable-gpl --enable-gnutls --enable-libx264 --enable-nonfree --enable-libvpl
  libavutil      58. 32.100 / 58. 32.100
  libavcodec     60. 34.100 / 60. 34.100
  libavformat    60. 17.100 / 60. 17.100
  libavdevice    60.  4.100 / 60.  4.100
  libavfilter     9. 13.100 /  9. 13.100
  libswscale      7.  6.100 /  7.  6.100
  libswresample   4. 13.100 /  4. 13.100
  libpostproc    57.  4.100 / 57.  4.100
Input #0, flv, from 'rtmp://live.a71.ru/demo/0':
  Metadata:
    |RtmpSampleAccess: true
    Server          : NGINX RTMP (github.com/arut/nginx-rtmp-module)
    displayWidth    : 1920
    displayHeight   : 1080
    fps             : 10
    profile         : 
    level           : 
  Duration: 00:00:00.00, start: 282846.534000, bitrate: N/A
  Stream #0:0: Video: h264 (Main), yuvj420p(pc, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 10 fps, 20 tbr, 1k tbn
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_qsv) -> wrapped_avframe (native))
Press [q] to stop, [?] for help
Segmentation fault (core dumped)

Attachments (3)

ffmpeg-20231126-220246.log (15.0 KB ) - added by iEvgeny 13 months ago.
gdb.log (17.4 KB ) - added by iEvgeny 13 months ago.
valgrind.log (20.5 KB ) - added by iEvgeny 13 months ago.

Download all attachments as: .zip

Change History (5)

by iEvgeny, 13 months ago

Attachment: ffmpeg-20231126-220246.log added

by iEvgeny, 13 months ago

Attachment: gdb.log added

by iEvgeny, 13 months ago

Attachment: valgrind.log added

comment:1 by iEvgeny, 13 months ago

Not an ffmpeg bug. Occurs somewhere in the underlying libvpl/libmfx layer. Fixed in Ubuntu 23.04.

comment:2 by iEvgeny, 13 months ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.