FFmpeg git repo
Go to file
Andreas Rheinhardt 98aaaf08b3 avcodec/rl2: Remove wrong check
This check is intended to be avoid buffer overflows,
yet there are four problems with it:
1. It has an in-built off-by-one error: len == out_end - out
is perfectly fine and nothing to worry about.
This off-by-one error led to the pixel in the lower-right corner
not being set properly for the back frame of the sample from
the rl2 FATE-test. This pixel is copied to every frame which
is the reason for the update to the reference file of said test.
With this patch, the output of the decoder matches the output
as captured from the reference decoder* (apart from the fact
that said reference somehow lacks the top part of the frame
(copied over from the background frame)).
2. Given that the stride of the buffer may be different
from the width of the video (despite one pixel taking one byte),
there is a second check lateron making the first check redundant
(if one returns immediately; a simple break at the second check
is not sufficient, because it only exits the inner loop).
3. The check is based around the assumption of the stride being
positive (it has this in common with the other check which
will be fixed in a future commit).
4. Even after fixing the off-by-one error, the check in
question is still triggered by all the non-background frames
in the FATE sample as well as by A1100100.RL2. In all these
cases, they use len == 255 and val == 128. For videos with
background frame this just means "copy from the background
frame", which would be done anyway lateron.* Yet for videos
without it copying it is necessary to avoid leaving
uninitialized parts in the video.

*: Available in https://samples.mplayerhq.hu/game-formats/voyeur-rl2/
**: Due to this, the code that copies the rest from the
back frame is no longer executed for any of the samples
available on the sample server. Given that these are only
the files from the demo version of this game, I don't know
whether this code is executed for any file in existence or not.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
2022-10-02 20:27:36 +02:00
compat compat/cuda: switch from powf to __powf intrinsic 2022-09-03 20:27:34 +02:00
doc lavu: add an APIchanges entry for RISC-V CPU flags 2022-10-02 11:59:34 +02:00
ffbuild configure: probe RISC-V Vector extension 2022-09-27 13:19:52 +02:00
fftools fftools/ffmpeg: Remove unused frame_bits_per_raw_sample variable 2022-10-02 11:59:25 +02:00
libavcodec avcodec/rl2: Remove wrong check 2022-10-02 20:27:36 +02:00
libavdevice avformat/internal: Don't include avcodec.h 2022-09-26 03:02:50 +02:00
libavfilter avfilter/vf_extractplanes: add missing break; statement 2022-09-27 19:35:49 +02:00
libavformat avcodec/mpeg4audio: Move ff_copy_pce_data() to a header of its own 2022-10-02 20:16:42 +02:00
libavutil avutil/tests/pixelutils: Test that all non-hw pix fmts have components 2022-09-30 14:33:08 +02:00
libpostproc configure: always enable gnu_windres if available 2022-08-13 14:42:36 +02:00
libswresample swsresample/swresample: error out on invalid layouts 2022-09-14 09:52:33 -03:00
libswscale sws/rgb2rgb: RISC-V 64-bit V packed YUYV/UYVY to planar 4:2:2 2022-09-30 07:25:44 +02:00
presets
tests avcodec/rl2: Remove wrong check 2022-10-02 20:27:36 +02:00
tools tools/target_dec_fuzzer: Adjust threshold for Jpeg2000 2022-09-16 21:30:59 +02:00
.gitattributes
.gitignore
.mailmap
.travis.yml
CONTRIBUTING.md
COPYING.GPLv2
COPYING.GPLv3
COPYING.LGPLv2.1
COPYING.LGPLv3
CREDITS
Changelog avcodec: add Media 100i decoder 2022-09-30 19:11:36 +02:00
INSTALL.md
LICENSE.md
MAINTAINERS MAINTAINERS: remove the project leader section 2022-09-23 16:06:11 +02:00
Makefile configure: probe RISC-V Vector extension 2022-09-27 13:19:52 +02:00
README.md
RELEASE RELEASE: update after 5.1 branch 2022-07-13 00:31:42 +02:00
configure configure: remove mdct15 from the encoder/decoder's list of requirements 2022-09-28 00:08:48 +02:00

README.md

FFmpeg README

FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.

Libraries

  • libavcodec provides implementation of a wider range of codecs.
  • libavformat implements streaming protocols, container formats and basic I/O access.
  • libavutil includes hashers, decompressors and miscellaneous utility functions.
  • libavfilter provides means to alter decoded audio and video through a directed graph of connected filters.
  • libavdevice provides an abstraction to access capture and playback devices.
  • libswresample implements audio mixing and resampling routines.
  • libswscale implements color conversion and scaling routines.

Tools

  • ffmpeg is a command line toolbox to manipulate, convert and stream multimedia content.
  • ffplay is a minimalistic multimedia player.
  • ffprobe is a simple analysis tool to inspect multimedia content.
  • Additional small tools such as aviocat, ismindex and qt-faststart.

Documentation

The offline documentation is available in the doc/ directory.

The online documentation is available in the main website and in the wiki.

Examples

Coding examples are available in the doc/examples directory.

License

FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.

Contributing

Patches should be submitted to the ffmpeg-devel mailing list using git format-patch or git send-email. Github pull requests should be avoided because they are not part of our review process and will be ignored.