MPV

~mpv-team/mpv/+git/ffmpeg:release/3.3

Last commit made on 2020-07-03
Get this branch:
git clone -b release/3.3 https://git.launchpad.net/~mpv-team/mpv/+git/ffmpeg

Branch merges

Branch information

Name:
release/3.3
Repository:
lp:~mpv-team/mpv/+git/ffmpeg

Recent commits

af8d5aa... by Andreas Rheinhardt <email address hidden>

lavf/webm_chunk: Fix NULL dereference

The earlier version of the webm_chunk muxer had several bugs:

1. If the first packet of an audio stream didn't have a PTS of zero,
then no chunk will be started before a packet is delivered to the
underlying Matroska/WebM muxer, i.e. the AVFormatContext used to write
these packets had a NULL as AVIOContext for output. This is behind the
crash in ticket #5752.

2. If an error happens during writing a packet, the underlyimg
Matroska/WebM muxer context is freed. This leads to a use-after-free
coupled with a double-free in webm_chunk_write_trailer (which supposes
that the underlying AVFormatContext is still valid).

3. Even when no error occurs at all, webm_chunk_write_trailer is still
buggy: After the underlying Matroska/WebM muxer has written its trailer,
ending the chunk implicitly flushes it again which is illegal at this
point.

These bugs have been fixed.

Fixes #5752.

Signed-off-by: Andreas Rheinhardt <email address hidden>
(cherry picked from commit 8c6ee7626bcce7c270360f33b60dc7ef99939fc3)
Signed-off-by: Andreas Rheinhardt <email address hidden>

eb89291... by Andreas Rheinhardt <email address hidden>

avcodec/ttaenc: Fix undefined shift

ttaenc contained (1 << unary) - 1 as an argument for a function
expecting an unsigned int. unary can be as big as 31 in this case.
The type of the shift and the whole expression is int, because 1 fits
into an integer, so that the behaviour is undefined if unary == 31
as the result of the shift can't be represented in an int §. Subtraction
by 1 (which makes the result of the whole expression representable in
an int) doesn't change that this is undefined (it usually leads to
signed integer overflow which is undefined, too).

The solution is simple: Make 1 unsigned to change the type of the
whole expression to unsigned int (as the function expects anyway).

Fixes ticket #8153.

§: This of course presupposes the common int range of -2^31..2^31-1

Signed-off-by: Andreas Rheinhardt <email address hidden>
Reviewed-by: Paul B Mahol <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit 3ab488a5407f833ecc66e8fa4c537dc4852db720)
Signed-off-by: Andreas Rheinhardt <email address hidden>

25a0887... by Andreas Rheinhardt <email address hidden>

fftools/ffmpeg: Free swresample dictionary during cleanup

Freeing this was forgotten in ad899522.

Fixes #8315 and #8316.

Signed-off-by: Andreas Rheinhardt <email address hidden>
Reviewed-by: Paul B Mahol <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit 6f2a3958cfac135c60b509a61a4fd39432d8f9a9)
Signed-off-by: Andreas Rheinhardt <email address hidden>

e5655c0... by Andreas Rheinhardt <email address hidden>

avfilter/vf_xbr: Fix left shift of negative number

Affected every usage of vf_xbr, e.g. the FATE-tests filter-2xbr,
filter-3xbr, filter-4xbr.

Signed-off-by: Andreas Rheinhardt <email address hidden>
Reviewed-by: Paul B Mahol <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit 4294dc3589a3ab973b10a85b576ff15e3ffb000d)
Signed-off-by: Andreas Rheinhardt <email address hidden>

0b4a122... by Andreas Rheinhardt <email address hidden>

avfilter/vf_hqx: Fix undefined left shifts of negative numbers

Affected every usage of this filter; in particular, it affected the
FATE-tests filter-2xbr, filter-3xbr and filter-4xbr.

Signed-off-by: Andreas Rheinhardt <email address hidden>
Reviewed-by: Paul B Mahol <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit fa211943265ca991548a4cc2f85a6df9cedcd092)
Signed-off-by: Andreas Rheinhardt <email address hidden>

d4f2de5... by Andreas Rheinhardt <email address hidden>

avcodec/jpeg2000dwt: Fix undefined shifts of negative numbers

Affected the vsynth*-jpeg2000 and the vsynth*-jpeg2000-97 FATE tests
(where * ranges over { 1, 2, 3, _lena }) as well as ticket #7983.

Signed-off-by: Andreas Rheinhardt <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit 5cf593adcd79a7c9502dc2725e1f0681ada36aef)
Signed-off-by: Andreas Rheinhardt <email address hidden>

32c81df... by Andreas Rheinhardt <email address hidden>

avcodec/ituh263dec: Fix undefined left shift of negative number

Fixes ticket #8160.

Signed-off-by: Andreas Rheinhardt <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit 324487b596fbcda0a5753c7bb7b2e96e9d512479)
Signed-off-by: Andreas Rheinhardt <email address hidden>

3c891c3... by Andreas Rheinhardt <email address hidden>

avcodec/dnxhdenc: Fix undefined left shifts of negative numbers

Affected 61 FATE-tests: 60 vsynth tests and lavf-mxf_opatom.

Signed-off-by: Andreas Rheinhardt <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit b7f156e8cbdf3256c7860c62ebb7a6c3002cbb03)
Signed-off-by: Andreas Rheinhardt <email address hidden>

94d7fbe... by Andreas Rheinhardt <email address hidden>

swscale/utils: Fix invalid left shifts of negative numbers

Affected the FATE-tests vsynth_lena-dv-411, vsynth1-dv-411,
vsynth2-dv-411 and hevc-paramchange-yuv420p.yuv420p10.

Signed-off-by: Andreas Rheinhardt <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit e2646e23be69bdef1e41d4decee1a4298701b8d1)
Signed-off-by: Andreas Rheinhardt <email address hidden>

2c5943a... by Andreas Rheinhardt <email address hidden>

swscale/x86/swscale: Fix undefined left shifts of negative numbers

This affected many FATE-tests: The number of failing tests went down
from 663 to 344. (Both numbers exclude tests that failed because of
unaligned accesses in code that is inside #if HAVE_FAST_UNALIGNED.)

Signed-off-by: Andreas Rheinhardt <email address hidden>
Signed-off-by: Michael Niedermayer <email address hidden>
(cherry picked from commit 736c7c20e7819811dc59f43490563789b192eb6e)
Signed-off-by: Andreas Rheinhardt <email address hidden>