[FFmpeg-trac] #5920(ffmpeg:new): static build FFmpeg segfault when VA-API hardware encoding

FFmpeg trac at avcodec.org
Mon Oct 31 17:31:19 EET 2016


#5920: static build FFmpeg segfault when VA-API hardware encoding
-------------------------------------+-------------------------------------
             Reporter:  warp         |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  ffmpeg       |                  Version:
             Keywords:  vaapi VA-    |  unspecified
  API ffmpeg                         |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 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

--
Ticket URL: <https://trac.ffmpeg.org/ticket/5920>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list