• Andriy Gelman's avatar
    avcodec/v4l2_m2m_enc: Check encoder pix_fmt matches pix_fmt on device · fc3760a6
    Andriy Gelman authored
    Fixes #8079
    
    During initialization of a v4l2m2m device, the configured pix_fmt can be
    different to the pix_fmt of the encoder (i.e. avctx->pix_fmt).
    
    For example on the Odroid XU4:
    ./ffmpeg -f lavfi -i yuvtestsrc -codec:v h264_v4l2m2m out.h264
    
    will configure the v4l2 encoder to pix_fmt nv21, whereas the input
    frames will be yuv444p.
    
    This commit checks that the configured v4l2 pix_fmt on device is the
    same as avctx->pix_fmt. If they are different the initialization fails
    and an error is returned. Tested on RPI4 and Odroid XU4.
    Signed-off-by: 's avatarAndriy Gelman <andriy.gelman@gmail.com>
    fc3760a6
Name
Last commit
Last update
compat Loading commit data...
doc Loading commit data...
ffbuild Loading commit data...
fftools Loading commit data...
libavcodec Loading commit data...
libavdevice Loading commit data...
libavfilter Loading commit data...
libavformat Loading commit data...
libavresample Loading commit data...
libavutil Loading commit data...
libpostproc Loading commit data...
libswresample Loading commit data...
libswscale Loading commit data...
presets Loading commit data...
tests Loading commit data...
tools Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING.md Loading commit data...
COPYING.GPLv2 Loading commit data...
COPYING.GPLv3 Loading commit data...
COPYING.LGPLv2.1 Loading commit data...
COPYING.LGPLv3 Loading commit data...
CREDITS Loading commit data...
Changelog Loading commit data...
INSTALL.md Loading commit data...
LICENSE.md Loading commit data...
MAINTAINERS Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
RELEASE Loading commit data...
configure Loading commit data...