Libavcodec.so: undefined reference to `v4l2_open’

Hi,
Please download source code and run the steps:

  1. Execute configure command in README.nvidia

ffmpeg-4.2.2$ ./configure --enable-nvv4l2dec --enable-libv4l2 --enable-shared --extra-libs=“-L/usr/lib/aarch64-linux-gnu/tegra -lnvbuf_utils” --extra-cflags=“-I /usr/src/jetson_multimedia_api/include/”

  1. Modify this line in ffbuild/config.mak

EXTRALIBS-avcodec=-pthread -lm -lz -lv4l2

  1. Modify this line in ffbuild/config.sh

extralibs_avcodec=“-pthread -lm -lz -lv4l2”

  1. Build the package: $ make -j4
  2. Compile the sample with self-built libavcodec.so

ffmpeg-4.2.2$ g++ ffmpeg_test.cpp -Llibavformat/ -lavformat -Llibavcodec/ -lavcodec -o ffmpeg_test