Commit Graph

73050 Commits

Author SHA1 Message Date
Michael Niedermayer
484eb2b0e3 avcodec/g2meet: Also clear tile dimensions on header_fail
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fb04666995)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
746a65640f avcodec/g2meet: Fix potential overflow in tile dimensions check
Fixes CID1322351

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 71ec8e1ed6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
50e4d38ce4 avcodec/svq1dec: Check init_get_bits8() for failure
Fixes: CID1322313

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a51d4246d8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
1e7ff902f2 avcodec/tta: Check init_get_bits8() for failure
Fixes: CID1322319

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f1593e4ca5)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
dceec28eac avcodec/vp3: Check init_get_bits8() for failure
Fixes CID1322316

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cbd3cd8eb2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
95db0aa276 swresample/swresample: Fix integer overflow in seed calculation
Fixes CID1322333

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 32f53958b8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
1e6f641052 avformat/mov: Fix integer overflow in FFABS
Fixes: unknown_unknown_19e_414_cov_764838672_bellhamlam.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 053e80f6ea)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
03ef13889c avutil/common: Add FFNABS()
This macro avoids the undefined corner case with the *_MIN values

Previous version Reviewed-by: Ganesh Ajjanagadde <gajjanag@mit.edu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d6cd614dac)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
ab3f129011 avutil/common: Document FFABS() corner case
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 733511fb53)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
ab91919e57 avformat/dump: Fix integer overflow in aspect ratio calculation
Fixes: unknown_unknown_19e_414_cov_764838672_bellhamlam.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit d1bdaf3fb2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
13aaefb70e avformat/mxg: Use memmove()
Fixes undefined behavior
Fixes: 1700002963a49da13542e0726b7bb758/unknown_unknown_292_658_cov_2141972066_m1.mxg

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c7c207aecd)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
19a29c92db avcodec/truemotion1: Check for even width
Fixes out of array access
Fixes: 87196d8bbc633629fc9dd851fce73e70/asan_heap-oob_26f6853_862_cov_585961513_sonic3dblast_intro-partial.avi

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 63fb5a6aef)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
ffcd26d25b avcodec/mpeg12dec: Set dimensions in mpeg1_decode_sequence() only in absence of errors
Fixes assertion failure
Fixes: 56dcafde14a8397161bb61a16c511179/signal_sigabrt_7ffff6ac8cc9_686_cov_1897408623_microsoft_new_way_to_shove_mpeg2_in_asf.dvr_ms

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b54e03c9dc)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
42fd94b514 avcodec/libopusenc: Fix infinite loop on flushing after 0 input
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6701c92fa4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:46 +01:00
Michael Niedermayer
679df05683 avformat/hevc: Check num_long_term_ref_pics_sps to avoid potentially long loops
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ee155c18a2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Arthur Grant
717c3ebfa4 avformat/hevc: Fix parsing errors
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 781efd0741)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
43b094fa03 ffmpeg: Use correct codec_id for av_parser_change() check
No testcase known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 45f3d4e63e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
483f5bccc1 ffmpeg: Check av_parser_change() for failure
No testcase known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ac0ba6f233)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
ce17111ed1 ffmpeg: Check for RAWVIDEO and do not relay only on AVFMT_RAWPICTURE
The null muxer has AVFMT_RAWPICTURE set but can be fed with non-raw material

related to Ticket4778

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8890941d6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
a8c8a2f3f4 ffmpeg: check avpicture_fill() return value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15ff3f3fdf)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
485372e91c avformat/mux: Update sidedata in ff_write_chained()
Fixes Ticket4777

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit db91e0edb6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
b87fc3526f avcodec/flashsvenc: Correct max dimension in error message
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b1f59bb660)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
d165ec179e avcodec/svq1enc: Check dimensions
Fixes assertion failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 88fe45e0fe)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Michael Niedermayer
94541f5f76 avcodec/dcaenc: clear bitstream end
This avoids leaving uninitialized bits in the output

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e322b7061f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
Emanuel Czirai
5e71f4aa6a libavcodec/aacdec_template: Use init_get_bits8() in aac_decode_frame()
related to ticket4749

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 7ab1c57a64)

Conflicts:

	libavcodec/aacdec_template.c
2015-11-12 02:55:45 +01:00
wm4
1900d023ae rawdec: fix mjpeg probing buffer size check
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 4c6beaed92)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
wm4
2c8a8a114c rawdec: fix mjpeg probing
There can be other headers than "Content-Type:" (in this case, a
"Content-Length:" header was following), so checking for a trailing
newline is wrong.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit bf51fcd304)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-12 02:55:45 +01:00
周晓勇
99ab664ff8 configure: loongson disable expensive optimizations in gcc O3 optimization
With gcc-4.9.2 loongson faild in test fate-dca, this is caused by option
-fexpensive-optimizations in -O3 optimization. We disable it temporarily
before the bug been fixed up.

Signed-off-by: ZhouXiaoyong <zhouxiaoyong@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2c34389551)

Conflicts:

	configure
2015-11-12 02:55:45 +01:00
Ronald S. Bultje
131f2c366e videodsp: don't overread edges in vfix3 emu_edge.
Fixes trac ticket 3226. Also see Andreas' analysis in
https://bugs.debian.org/801745, which was very helpful.
(cherry picked from commit 52f84d82bd)
2015-10-25 01:09:12 +02:00
wm4
9362282fd1 avformat/mp3dec: improve junk skipping heuristic
Commit 2b3e9bbfb5 caused problems for a
certain API user:

https://code.google.com/p/chromium/issues/detail?id=537725
https://code.google.com/p/chromium/issues/detail?id=542032

The problem seems rather arbitrary, because if there's junk, anything
can happen. In this case, the imperfect junk skipping just caused it to
read different junk, from what I can see.

We can improve the accuracy of junk detection by a lot by checking if 2
consecutive frames use the same configuration. While in theory it might
be completely fine for the 1st frame to have a different format than the
2nd frame, it's exceedingly unlikely, and I can't think of a legitimate
use-case.

This is approximately the same mpg123 does for junk skipping. The
set of compared header bits is the same as the libavcodec mp3 parser
uses for similar purposes.
(cherry picked from commit de1b1a7da9)

Conflicts:
	libavformat/mp3dec.c
2015-10-20 12:46:22 +02:00
Anssi Hannula
1f25a3ddb8 avformat/hls: add support for EXT-X-MAP
Without EXT-X-MAP support we miss the first bytes of some streams.

These streams worked by luck before byte-ranged segment support was added in
da7759b357

Fixes ticket #4797.
(cherry picked from commit 9099079488)

Conflicts:
	libavformat/hls.c
2015-10-15 14:41:32 +02:00
Anssi Hannula
e69d8fc619 avformat/hls: fix segment selection regression on track changes of live streams
Commit ad701326b4 ("avformat/hls: open playlists immediately when
AVDISCARD_ALL is dropped") inadvertently caused first_packet to never be
cleared, causing select_cur_seq_no() to not use the specific code for
live streams.

In practice this means that when the user selects a different audio
track during live stream (i.e. non-VOD) playback, there may be some
additional delay as the code might select an incorrect segment at first,
and we have to wait for video to catch audio (if too late segment was
selected) or to download more following audio segments (if too early
segment was selected).

Fix that by restoring the zeroing of first_packet.
(cherry picked from commit fd74d45d51)
2015-10-15 14:41:23 +02:00
Rodger Combs
6197d35a93 lavf/matroskadec: Fully parse and repack MP3 packets
Fixes https://trac.ffmpeg.org/ticket/4776

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b4b2717ffe)
2015-10-09 21:36:40 +02:00
Michael Niedermayer
8f00ff5ae0 avcodec/h264_mp4toannexb_bsf: Reorder operations in nal_size check
Fixes Ticket4778

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2bb54b82b5)
2015-10-09 21:36:11 +02:00
Michael Niedermayer
eee1faef75 avformat/oggenc: Check segments_count for headers too
Fixes infinite loop and segfault in ogg_buffer_data()
Fixes Ticket4806

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 81a8701eb5)
2015-10-09 21:35:11 +02:00
Michael Niedermayer
1ef419447e avformat/segment: atomically update list if possible
Fixes Ticket4802

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e2b19a533d)
2015-10-09 21:34:38 +02:00
Michael Niedermayer
6752f8ef04 avformat/avidec: Workaround broken initial frame
Fixes Ticket4851

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e2ef00394)
2015-10-09 21:34:11 +02:00
Hendrik Leppkes
98fdd0baf3 hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
Fixes ticket #4185.

Reviewed-By: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
(cherry picked from commit 0118158efa)
2015-10-09 21:33:56 +02:00
Ronald S. Bultje
f7cb979766 hevc: fix wpp threading deadlock.
Fixes ticket 4258.
(cherry picked from commit 74e4948235)
2015-10-09 21:33:35 +02:00
Michael Niedermayer
0fb4a85603 avcodec/ffv1: seperate slice_count from max_slice_count
Fix segfault with too large slice_count
Fixes Ticket4879

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit aa6c43f3fd)

Conflicts:
	libavcodec/ffv1enc.c
2015-10-09 21:32:52 +02:00
Przemysław Sobala
2ef386d0a6 lavf/img2dec: Fix memory leak
Fixes #4886

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 01dd7e025c)
2015-10-09 21:30:46 +02:00
wm4
114c0f002a avcodec/mp3: fix skipping zeros
Commits 43bc5cf9 and c5371f77 add code for skipping initial zeros in mp3
packets. This code forgot to report to the user that data was skipped at
all.

Since audio codecs allow partial packet decoding, the user application
has to rely on the return value. It will remove the data reported as
consumed by the decoder, and feed it to the decoder again. This resulted
in the mp3 frame after the zero region to be decoded over and over
again, until the zero region was finally skipped by the application.

Fix this by including the amount of skipped bytes to the number of
consumed bytes returned by the decode call.

Fixes trac ticket #4890.
(cherry picked from commit cb1da9fb8d)
2015-10-09 21:29:03 +02:00
Clément Bœsch
6b6932471e avformat/srtdec: make sure we probe a number
Fixes regression since 7218352e02: WebVTT
files were matching the SRT probing.
(cherry picked from commit 40d9d6de90)
2015-10-09 21:28:20 +02:00
Clément Bœsch
5ac6daf995 avformat/srtdec: more lenient first line probing
Fixes Ticket #4898
(cherry picked from commit 7218352e02)
2015-10-09 21:27:28 +02:00
James Almer
763c0d25b1 doc: mention libavcodec can decode Opus natively
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit fd9ac48dc8)
2015-09-20 23:28:53 -03:00
Michael Niedermayer
b1863e3d94 avcodec/ffv1enc: fix assertion failure with unset bits per raw sample
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 749f85496c)

Fixes ticket #4751.
2015-08-04 12:56:52 +02:00
Michael Niedermayer
4afccfdc04 MAINTAINERS: Remove myself as leader
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f2c58931e6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-31 18:35:30 +02:00
James Almer
a3d45dbcc1 mips/hevcdsp: fix string concatenation on macros
Needed for old compilers like GCC 4.2

Tested by trac user brad. Fixes ticket #4745

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit a0092cea46)
2015-07-30 21:01:32 -03:00
Andreas Cadhalpun
15466db69e Changelog update
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
n2.7.2
2015-07-19 10:56:11 +02:00
Andreas Cadhalpun
27816fb9ef imc: use correct position for flcoeffs2 calculation
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 75fd5ce4c1)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
2015-07-19 10:14:31 +02:00