commit | 0788a74876e5dffb7c41aef874ab7776b49f718c | [log] [tgz] |
---|---|---|
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | Thu Sep 03 14:25:24 2020 |
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | Mon Mar 08 02:33:27 2021 |
tree | 47803e3843686df9c452ea3281d8e20116a273f8 | |
parent | 130d89d786d29148deb846de48b16e11a894e8a7 [diff] |
avcodec/jpeglsenc: Don't modify frame we don't own The jpegls encoder uses three buffers (as well as its state) to perform its function: A copy of the last encoded line as a decoder would decode it, the part of the current line that has been encoded (again, as a decoder would decode it) and the part of the current line that is not yet encoded. The encoder solves this by modifying the input frame as it encodes the output (it also zero-allocates a line to serve as last line for the first line where no preceding line exists); yet this is wrong as said frame is not owned by the encoder, so it must not be modified (and it is given to the encoder as const AVFrame *) without making it writable. This patch solves this bug by allocating two lines, one for the last and one for the currently encoded line of output (as a decoder would decode it). Notice that the frame is only modified if the encoder is in the non-default non-lossless mode. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
FFmpeg is a collection of libraries and tools to process multimedia content such as audio, video, subtitles and related metadata.
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 a mean to alter decoded Audio and Video through chain of 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.aviocat
, ismindex
and qt-faststart
.The offline documentation is available in the doc/ directory.
The online documentation is available in the main website and in the wiki.
Coding examples are available in the doc/examples directory.
FFmpeg codebase is mainly LGPL-licensed with optional components licensed under GPL. Please refer to the LICENSE file for detailed information.
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.