Opened 6 days ago

#11186 new defect

fillborders spurious argument checks

Reported by: space-pope Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords:
Cc: space-pope Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
The fillborders filter has checks to ensure that its arguments don't overflow the input stream's bounds. This makes sense, but the checks seem overly protective:

https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/master:/libavfilter/vf_fillborders.c#l606

The input link's width can't be smaller than the left argument or left + right — that's reasonable, but then there's *also* a check that keeps the width from being smaller than left * 2, which seems overkill — as long as left + right is <= the input width, shouldn't the filter be able to fill the appropriate area?

The same question applies for top, bottom, and the input height.

Thanks!

% ffmpeg -filter_complex "color=s=640x480:d=1,fillborders=mode=fixed:color=0xFF0000:left=420:right=0" border_test.mp4
ffmpeg version n6.1.1-329-g0bd31a8f91-20240801 Copyright (c) 2000-2024 the FFmpeg developers
  built with gcc 14.1.0 (crosstool-NG 1.26.0.93_a87bf7f)
  configuration: --prefix=/ffbuild/prefix --pkg-config-flags=--static --pkg-config=pkg-config --cross-prefix=x86_64-ffbuild-linux-gnu- --arch=x86_64 --target-os=linux --enable-gpl --enable-version3 --disable-debug --enable-iconv --enable-zlib --enable-libfreetype --enable-libfribidi --enable-gmp --enable-libxml2 --enable-openssl --enable-lzma --enable-fontconfig --enable-libharfbuzz --enable-libvorbis --enable-opencl --enable-libpulse --enable-libvmaf --enable-libxcb --enable-xlib --enable-amf --enable-libaom --enable-libaribb24 --enable-avisynth --enable-chromaprint --enable-libdav1d --enable-libdavs2 --disable-libfdk-aac --enable-ffnvcodec --enable-cuda-llvm --enable-frei0r --enable-libgme --enable-libkvazaar --enable-libaribcaption --enable-libass --enable-libbluray --enable-libjxl --enable-libmp3lame --enable-libopus --enable-librist --enable-libssh --enable-libtheora --enable-libvpx --enable-libwebp --enable-lv2 --enable-libvpl --enable-openal --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopenmpt --enable-librav1e --enable-librubberband --disable-schannel --enable-sdl2 --enable-libsoxr --enable-libsrt --enable-libsvtav1 --enable-libtwolame --enable-libuavs3d --enable-libdrm --enable-vaapi --enable-libvidstab --enable-vulkan --enable-libshaderc --enable-libplacebo --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libzimg --enable-libzvbi --extra-cflags=-DLIBTWOLAME_STATIC --extra-cxxflags= --extra-libs='-ldl -lgomp' --extra-ldflags=-pthread --extra-ldexeflags=-pie --cc=x86_64-ffbuild-linux-gnu-gcc --cxx=x86_64-ffbuild-linux-gnu-g++ --ar=x86_64-ffbuild-linux-gnu-gcc-ar --ranlib=x86_64-ffbuild-linux-gnu-gcc-ranlib --nm=x86_64-ffbuild-linux-gnu-gcc-nm --extra-version=20240801
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
  libpostproc    57.  3.100 / 57.  3.100
[Parsed_fillborders_1 @ 0x5560b1593e40] Borders are bigger than input frame size.
[Parsed_fillborders_1 @ 0x5560b1593e40] Failed to configure input pad on Parsed_fillborders_1
[fc#0 @ 0x5560b1584580] Error configuring filter graph: Invalid argument
Error opening output file border_test.mp4.
Error opening output files: Invalid argument

Change History (0)

Note: See TracTickets for help on using tickets.