diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-09-03 16:25:24 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-03-08 03:33:27 +0100 |
commit | 0788a74876e5dffb7c41aef874ab7776b49f718c (patch) | |
tree | 47803e3843686df9c452ea3281d8e20116a273f8 /MAINTAINERS | |
parent | 130d89d786d29148deb846de48b16e11a894e8a7 (diff) | |
download | ffmpeg-0788a74876e5dffb7c41aef874ab7776b49f718c.tar.gz |
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>
Diffstat (limited to 'MAINTAINERS')
0 files changed, 0 insertions, 0 deletions