#5920 closed defect (invalid)
static build FFmpeg segfault when VA-API hardware encoding
Reported by: | warp | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | vaapi |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
static build ffmpeg segmentation faults when using VA-API hardware encoding.
How to reproduce:
build ffmpeg statically as below on Ubuntu 16.04
(to build static binary with vaapi support, I have to set "--extra-libs" value. Is this a know issue?)
apt update apt upgrade -y apt install -y \ build-essential \ git \ libdrm-dev libva-dev nasm \ pkg-config \ yasm git pull https://git.ffmpeg.org/ffmpeg.git cd ffmpeg ./configure \ --prefix=/usr/local \ --enable-pic \ --enable-gpl \ --enable-version3 \ --enable-nonfree \ --enable-static \ --disable-shared \ --disable-ffplay \ --disable-doc \ --extra-cflags="--static" \ --extra-libs="-static -lva -ldl -ldrm -lm" \ --enable-debug make
then,
# ./ffmpeg_g -vaapi_device /dev/dri/renderD128 -hwaccel vaapi -hwaccel_output_format vaapi -i /tmp/original.ts -vf 'format=nv12|vaapi,hwupload' -c:v h264_vaapi -an /tmp/encoded.mp4 ffmpeg version n3.1.5 Copyright (c) 2000-2016 the FFmpeg developers built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.2) 20160609 configuration: --prefix=/usr/local --enable-pic --enable-gpl --enable-version3 --enable-nonfree --enable-static --disable-shared --disable-ffplay --disable-doc --extra-cflags=--static --extra-libs='-static -lva -ldl -ldrm -lm' --enable-debug libavutil 55. 28.100 / 55. 28.100 libavcodec 57. 48.101 / 57. 48.101 libavformat 57. 41.100 / 57. 41.100 libavdevice 57. 0.101 / 57. 0.101 libavfilter 6. 47.100 / 6. 47.100 libswscale 4. 1.100 / 4. 1.100 libswresample 2. 1.100 / 2. 1.100 libpostproc 54. 0.100 / 54. 0.100 libva info: VA-API version 0.39.0 libva info: va_getDriverName() returns 0 libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so Segmentation fault (core dumped)
gdb output is http://pastebin.com/tpmAgJye
valgrind output is http://pastebin.com/3sLVB8m5
Change History (2)
comment:1 by , 7 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 by , 7 years ago
Component: | ffmpeg → undetermined |
---|---|
Keywords: | VA-API ffmpeg removed |
Note:
See TracTickets
for help on using tickets.
This is nothing to do with ffmpeg: libva cannot be linked into a static binary because it requires the dynamic linker to do driver loading.
Try building any of the libva test programs such as vainfo statically and you will find exactly the same problem: