ffmpeg.git
4 years agoavutil/cpu: force mmx on selection of higher x86 SIMD features
Michael Niedermayer [Tue, 20 May 2014 03:23:52 +0000 (05:23 +0200)]
avutil/cpu: force mmx on selection of higher x86 SIMD features

Fixes various runtime failures with manually set flags that represent no
existing CPU

Fixes Ticket3653

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6310eb8010b7a3b3016e297132380cbd4e3d2d10)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/diracdec: move mc buffer allocation to per frame
Michael Niedermayer [Mon, 19 May 2014 04:19:23 +0000 (06:19 +0200)]
avcodec/diracdec: move mc buffer allocation to per frame

Fixes out of array accesses for non default buffers with large strides

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4a30f08505a4e85718896ff233c97be41a9754ca)
(cherry picked from commit 9c9fc79d9237d28e33161cb2e75082d8ad232b2e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/graphdump: Fix pointer to local outside scope
Michael Niedermayer [Mon, 28 Apr 2014 02:01:50 +0000 (04:01 +0200)]
avfilter/graphdump: Fix pointer to local outside scope

Fixes CID1194435
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 18af0ce62da322176f7bd283b85314d2f41bee2c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mjpegdec: Fix undefined shift
Michael Niedermayer [Sun, 27 Apr 2014 03:32:56 +0000 (05:32 +0200)]
avcodec/mjpegdec: Fix undefined shift

Fixes CID1194388

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b4329605289e25bb071ec1c1182bf25fc83b09aa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoffmpeg_filter: fix pointer to local outside scope
Michael Niedermayer [Sun, 27 Apr 2014 01:45:12 +0000 (03:45 +0200)]
ffmpeg_filter: fix pointer to local outside scope

Fixes CID1206652
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 09b16619d33ddf93005060d0782f28a1c1cbb7f6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/h263dec: Fix h263 probe
Michael Niedermayer [Wed, 23 Apr 2014 19:47:48 +0000 (21:47 +0200)]
avformat/h263dec: Fix h263 probe

The code was missing 1 bit in the src format

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fc145e576a443bfc89efdf35b91fd3c9ca0d8388)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mux: Check for and remove invalid packet durations
Michael Niedermayer [Wed, 23 Apr 2014 04:04:50 +0000 (06:04 +0200)]
avformat/mux: Check for and remove invalid packet durations

Fixes assertion failure
Fixes Ticket3575

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc6a17cf74a90e41d70ea1753cdb70c0a5b2ced8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/filtfmts: Support dynamically allocated in/outputs
Michael Niedermayer [Mon, 21 Apr 2014 09:33:17 +0000 (11:33 +0200)]
avfilter/filtfmts: Support dynamically allocated in/outputs

Fixes crash
Fixes Ticket3468

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 59c7615d58b5b7ea9caff2c8c774677973eb4f1c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoiavcodec/vc1dec: Fix missing {}
Michael Niedermayer [Wed, 16 Apr 2014 00:06:37 +0000 (02:06 +0200)]
iavcodec/vc1dec: Fix missing {}

Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cb53beb81a5b9192c79de401f1e1e13fadddc429)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/vf_deshake: fix loss of precission with odd resolutions
Michael Niedermayer [Wed, 16 Apr 2014 00:06:37 +0000 (02:06 +0200)]
avfilter/vf_deshake: fix loss of precission with odd resolutions

Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 73734282e0e4df92269984ee1671424e39249481)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/f_select: fix loss of precission in SAD calculation
Michael Niedermayer [Wed, 16 Apr 2014 00:06:37 +0000 (02:06 +0200)]
avfilter/f_select: fix loss of precission in SAD calculation

Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5a8ef3c66b762f265b05aa096105555f1d26879c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/g723_1: add assert to help static code analyzers
Michael Niedermayer [Wed, 16 Apr 2014 00:55:13 +0000 (02:55 +0200)]
avcodec/g723_1: add assert to help static code analyzers

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1457f3fd90e17745791354fbb87899fc4803085a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/diracdec: fix undefined behavior with shifts
Michael Niedermayer [Wed, 16 Apr 2014 00:06:37 +0000 (02:06 +0200)]
avcodec/diracdec: fix undefined behavior with shifts

Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b8598f6ce61ccda3f2ff0c730b009fb650e42986)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mpegts: Remove redundant check
Michael Niedermayer [Wed, 16 Apr 2014 00:06:37 +0000 (02:06 +0200)]
avformat/mpegts: Remove redundant check

Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ff6fa0b4b980fc5b9f7653d7b159ae02c3d95210)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mjpegen: Fix declared argument size
Michael Niedermayer [Wed, 16 Apr 2014 00:06:37 +0000 (02:06 +0200)]
avcodec/mjpegen: Fix declared argument size

Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 256f530603ef3838a712a4fcd737b46b7bce455e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswscale/swscale: fix srcStride/srcSlice typo
Michael Niedermayer [Tue, 15 Apr 2014 23:55:08 +0000 (01:55 +0200)]
swscale/swscale: fix srcStride/srcSlice typo

Fixes part of Ticket3466
Found by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 14fa7fc6a81d5e59e05243cdc92108eab1b138ac)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/x86/idct_sse2_xvid: fix non C99 inline function
Michael Niedermayer [Mon, 14 Apr 2014 15:29:27 +0000 (17:29 +0200)]
avcodec/x86/idct_sse2_xvid: fix non C99 inline function

Found-by: Matt Oliver <protogonoi@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 46d5625f44185271862337d61cd246fd569c42a4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/lzo: add asserts to be double sure against overflows
Michael Niedermayer [Mon, 23 Jun 2014 12:45:47 +0000 (14:45 +0200)]
avutil/lzo: add asserts to be double sure against overflows

These asserts cannot fail since d6af26c55c1ea30f85a7d9edbc373f53be1743ee

Based-on: ccda51b14c0fcae2fad73a24872dce75a7964996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cf2b7c01f81c1fb3283a1390c0ca9a2f81f4f4a8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/lzo: Fix integer overflow
Michael Niedermayer [Fri, 20 Jun 2014 01:15:28 +0000 (03:15 +0200)]
avutil/lzo: Fix integer overflow

Embargoed-till: 2014-06-27 requested by researcher, but embargo broken by libav today (git and mailing list)

Fixes: LMS-2014-06-16-4
Found-by: "Don A. Bailey" <donb@securitymouse.com>
See: ccda51b14c0fcae2fad73a24872dce75a7964996
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d6af26c55c1ea30f85a7d9edbc373f53be1743ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/dirac_arith: Fix build with PIC and stack-check options
Anthoine Bourgeois [Wed, 9 Apr 2014 10:18:32 +0000 (12:18 +0200)]
avcodec/dirac_arith: Fix build with PIC and stack-check options

Fixes Ticket3540

The function dirac_get_arith_bit in libavcodec/dirac_arith.h can't be
built with PIC and check-stack because the asm code needs 6 registers
and PIC and check-stack options take 1 each and x86 is quite limited
in this area.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d8ab7f31dd819f7b3e0d460a2fa4261aaae87b98)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswscale/x86/swscale_template: loose hardcoded dstw_offset
Michael Niedermayer [Tue, 8 Apr 2014 16:12:12 +0000 (18:12 +0200)]
swscale/x86/swscale_template: loose hardcoded dstw_offset

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f6759d9ad4a8b71e6f212ca4f1e7da9fa56d3298)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample/resample: use av_malloc_array() where appropriate
Michael Niedermayer [Mon, 7 Apr 2014 22:29:26 +0000 (00:29 +0200)]
swresample/resample: use av_malloc_array() where appropriate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5027f39712fdce25b9008e72d52e5abfeefd5fe6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample/dither: use av_malloc_array()
Michael Niedermayer [Mon, 7 Apr 2014 22:29:06 +0000 (00:29 +0200)]
swresample/dither: use av_malloc_array()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a5290cb1ac047851563da7aca06569e3ada55f79)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswresample/resample: Limit filter length
Michael Niedermayer [Mon, 7 Apr 2014 22:19:07 +0000 (00:19 +0200)]
swresample/resample: Limit filter length

Related to CID1197063

The limit choosen is arbitrary and much larger than what makes sense.
It avoids the need for checking arithmetic operations with the length for overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f9158b01d0f3effb58e87fb07db0382bc1e47de5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/msrle: check return code for success before use
Michael Niedermayer [Sun, 6 Apr 2014 02:01:24 +0000 (04:01 +0200)]
avcodec/msrle: check return code for success before use

The check is possibly redundant, but better to check for errors
that dont occur than to skip the check and crash

Fixes CID1197060

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 754f84663e8b3a88fa2e953b195d59230393fb8d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/wma: use av_freep(), do not leave stale pointers in memory
Michael Niedermayer [Sat, 5 Apr 2014 19:34:03 +0000 (21:34 +0200)]
avcodec/wma: use av_freep(), do not leave stale pointers in memory

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d167faafe9dfa0b82bebb267c3c4e5fa5286bd67)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agolavu/opt: validate range before dereference
Lukasz Marek [Fri, 4 Apr 2014 17:28:45 +0000 (19:28 +0200)]
lavu/opt: validate range before dereference

This change make error handling simplier.
av_opt_freep_ranges may be called when some ranges are NULL,
for example after memory allocation fail.

Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3aac5fcfa9d3748659d78ab2a66d0ccce22cfd4f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thr...
Michael Niedermayer [Thu, 3 Apr 2014 21:46:25 +0000 (23:46 +0200)]
avcodec/h264: clear cur_pic structure instead of duplicating it in ff_h264_update_thread_context()

Fixes crash

Found-by: iive
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8710ee11d75eebc17e7d63bc6ffb91766933bd68)

Conflicts:

libavcodec/h264_slice.c
(cherry picked from commit cb44d69665596d2f19e032fc852162b0a6de0562)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavfilter/vf_pullup: fix gray8
Michael Niedermayer [Mon, 31 Mar 2014 01:22:20 +0000 (03:22 +0200)]
avfilter/vf_pullup: fix gray8

Fixes segfault
Fixes Ticket3469

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e818ee090ac53d1b333a7d6a45274f75cf1a71a1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/libx264: move where x264opts is applied down so it isnt overridden by avctx...
Michael Niedermayer [Thu, 27 Mar 2014 23:03:38 +0000 (00:03 +0100)]
avcodec/libx264: move where x264opts is applied down so it isnt overridden by avctx & defaults

fixes x264opts opengop=1

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 64b79141bdfdffaa9fda69eecce140473d0a9a18)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264_mp4toannexb_bsf: prepend global headers before any in stream parameter...
Michael Niedermayer [Wed, 26 Mar 2014 17:09:23 +0000 (18:09 +0100)]
avcodec/h264_mp4toannexb_bsf: prepend global headers before any in stream parameter sets

Fixes h264_mp4toannexb_bsf_failure.mkv

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 289b149cecb381522cc9ccdf382825330169c655)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/x86/mpegvideoenc_template: fix integer overflow
Michael Niedermayer [Mon, 24 Mar 2014 23:15:52 +0000 (00:15 +0100)]
avcodec/x86/mpegvideoenc_template: fix integer overflow

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agodox/scaler:fix bicubiclin typo
Michael Niedermayer [Mon, 24 Mar 2014 21:04:52 +0000 (22:04 +0100)]
dox/scaler:fix bicubiclin typo

See Ticket3486

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 575b957758670d6094e9095acfcc24e4e32fc4a7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswscale/swscale: fix integer overflow
Michael Niedermayer [Mon, 24 Mar 2014 04:01:32 +0000 (05:01 +0100)]
swscale/swscale: fix integer overflow

Should fix fate failure with clang ftrapv

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c9c0451224fd7bc38b4e135e99f114f80c1ae67f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec: Add padding after the remaining AVFrames
Michael Niedermayer [Mon, 17 Mar 2014 23:08:54 +0000 (00:08 +0100)]
avcodec: Add padding after the remaining AVFrames

This limits ABI issues in case libavcodec is linked to a libavutil with larger AVFrame
Which can happen if they are shiped in seperate binary packages and libavutil is upgraded

A cleaner alternative would be to replace them by pointers but this would likely cause
a small speedloss

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fc567ac49e17151f00f31b59030cd10f952612ef)

Conflicts:

libavcodec/h264.h
(cherry picked from commit 618d062bd553a7d7fad194d4236913f2b0a0251e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/mp3enc: use av_copy_packet()
Michael Niedermayer [Sat, 22 Mar 2014 00:26:48 +0000 (01:26 +0100)]
avformat/mp3enc: use av_copy_packet()

Fixes double free
Fixes Ticket3476

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d003a0cd2e587a47627fd328f9fc5a484adc29f2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoffmpeg: dont call exit_program() from a signal hander
Michael Niedermayer [Fri, 21 Mar 2014 14:45:03 +0000 (15:45 +0100)]
ffmpeg: dont call exit_program() from a signal hander

This is unsafe and can deadlock amongth other things

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9dca02ee541120de2a96c387faed9a4e033a60fd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoShow duration for large asf files as written in the file header.
Carl Eugen Hoyos [Sat, 21 Jun 2014 17:35:06 +0000 (19:35 +0200)]
Show duration for large asf files as written in the file header.

Fixes ticket #3428.
(cherry picked from commit e3fd263f0b73e4425192d6dd1ab18027ecaa35db)

4 years agoadpcm: Write the proper predictor in trellis mode in IMA QT
Martin Storsjö [Fri, 6 Jun 2014 09:03:09 +0000 (12:03 +0300)]
adpcm: Write the proper predictor in trellis mode in IMA QT

The actual predictor value, set by the trellis code, never
was written back into the variable that was written into
the block header. This was accidentally removed in b304244b.

This significantly improves the audio quality of the trellis
case, which was plain broken since b304244b.

Encoding IMA QT with trellis still actually gives a slightly
worse quality than without trellis, since the trellis encoder
doesn't use the exact same way of rounding as in
adpcm_ima_qt_compress_sample and adpcm_ima_qt_expand_nibble.

Fixes part of Ticket3701

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fa8f060b75bf9074792a0f9ff4ed002652ef62b8)

Conflicts:
tests/ref/acodec/adpcm-ima_qt-trellis

4 years agoadpcm: Fix trellis encoding of IMA QT
Martin Storsjö [Thu, 5 Jun 2014 08:56:10 +0000 (11:56 +0300)]
adpcm: Fix trellis encoding of IMA QT

This was broken in 095be4fb - samples+ch (for the previous
non-planar case) equals &samples_p[ch][0]. The confusion
probably stemmed from the IMA WAV case where it originally
was &samples[avctx->channels + ch], which was correctly
changed into &samples_p[ch][1].

Fixes part of Ticket3701

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a32765c4252eb106a2ade543026ef6f59e699bfa)

4 years agoavcodec/mjpegdec: Improve intel jpeg flip heuristic
Michael Niedermayer [Thu, 5 Jun 2014 23:32:22 +0000 (01:32 +0200)]
avcodec/mjpegdec: Improve intel jpeg flip heuristic

Fixes Ticket3698

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0545ef7116db1e87894d978bfa400578652c716d)

4 years agoavcodec/h264: in the absence of recovery points, be more tolerant on accepting plain...
Michael Niedermayer [Wed, 4 Jun 2014 02:25:14 +0000 (04:25 +0200)]
avcodec/h264: in the absence of recovery points, be more tolerant on accepting plain I frames

Fixes: Ticket3652
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 19c9d1e8e71da04c3ac940206619c0a2d01e5193)

4 years agoavcodec/utvideodec: Increase vlc len
Carl Eugen Hoyos [Thu, 29 May 2014 06:41:15 +0000 (08:41 +0200)]
avcodec/utvideodec: Increase vlc len

Fixes a regression since fb3e380 similar to ticket #2661,
reported by fluffrabbit at aol dot com.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 673716c54b39eba9579a38ad222130e3f9549167)

4 years agoDo not limit blocksize when reading PCM from aiff.
Carl Eugen Hoyos [Mon, 2 Jun 2014 22:54:46 +0000 (00:54 +0200)]
Do not limit blocksize when reading PCM from aiff.

Fixes ticket #3695.
(cherry picked from commit 763e714442e07f6430b003c8a9f4b62deaa7b3a5)

4 years agoavformat/avidec: allow rounding errors between scale/rate and timebase
Michael Niedermayer [Wed, 4 Jun 2014 03:04:13 +0000 (05:04 +0200)]
avformat/avidec: allow rounding errors between scale/rate and timebase

Fixes Ticket3670

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 571ab8344a9a2864d22d01af41283cee9328b927)

4 years agoffprobe: fix crash happening because of new streams occuring
Anshul [Wed, 14 May 2014 16:51:58 +0000 (22:21 +0530)]
ffprobe: fix crash happening because of new streams occuring

Fix trac ticket #3603.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
(cherry picked from commit 73a60633143b7c51333a0772b45a47282ac445b6)

Conflicts:
ffprobe.c

4 years agoUse Matroska document version 2 for WebM files if possible.
Carl Eugen Hoyos [Mon, 12 May 2014 16:12:28 +0000 (18:12 +0200)]
Use Matroska document version 2 for WebM files if possible.

Google's plugin for the Internet Explorer refuses to play
files with another document version.

Fixes ticket #3583.
(cherry picked from commit ab21acecc72a0299895583cf83347ab5e2444b71)

4 years agosws: dont use the optimized 410->420 unscaled conversion when height%4
Michael Niedermayer [Wed, 30 Apr 2014 04:21:58 +0000 (06:21 +0200)]
sws: dont use the optimized 410->420 unscaled conversion when height%4

Fixes Ticket3594
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 421b21ca8a02a346ba03cea3bb2ecc33f791fc30)

4 years agoavcodec/vorbisdec: try to workaround libvorbisenc bug
Michael Niedermayer [Wed, 30 Apr 2014 02:12:29 +0000 (04:12 +0200)]
avcodec/vorbisdec: try to workaround libvorbisenc bug

Fixes Ticket3590

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0a266cb55af9794fc5cff695d35cae4111e4334f)

4 years agoswresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input
Michael Niedermayer [Wed, 23 Apr 2014 23:25:46 +0000 (01:25 +0200)]
swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input

Fixes Ticket 3542

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 291d464161a5bf3b566bc147f83e4242b0c18d74)

4 years agoffprobe: fix scaling of vali in value_string() in case -prefix is selected
Stefano Sabatini [Tue, 22 Apr 2014 11:01:14 +0000 (13:01 +0200)]
ffprobe: fix scaling of vali in value_string() in case -prefix is selected

Fix trac ticket #3523.
(cherry picked from commit 1ba59b1cbeafe7cd28db04f772abd89eb7e4ce1e)

4 years agoavformat/avidec: Speed up keyframe detection code
Michael Niedermayer [Tue, 22 Apr 2014 02:00:32 +0000 (04:00 +0200)]
avformat/avidec: Speed up keyframe detection code

Fixes Ticket3531

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57fb570908df2e84b11635f12b5be1fb27f053eb)

4 years agoff_id3v2_read: add option to limit ID3 magic number search
Peter Ross [Fri, 18 Apr 2014 04:49:40 +0000 (14:49 +1000)]
ff_id3v2_read: add option to limit ID3 magic number search

Several chunked formats (AIFF, IFF,DSF) store ID3 metadata within an 'ID3 '
chunk tag. If such chunks are stored sequentially, it is possible for the
ID3v2 parser to confuse the chunk tag for the ID3 magic number. e.g.

[1st chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]
[2nd chunk tag ('ID3 ') | chunk size] [ID3 magic number | metadata ...]

Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5331773cc33ba26b9e26ace643d926219e46a17b)

Conflicts:
libavformat/dsfdec.c
libavformat/id3v2.c

4 years agoff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULL
Peter Ross [Sat, 19 Apr 2014 02:12:00 +0000 (12:12 +1000)]
ff_id3v2_free_extra_meta: set the pointer pointing to extra_meta to NULL

Fixes ticket #3530.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c94305ae23318c8956a30485cd5642829f4f16a9)

4 years agoavformat/matroskadec: support SVQ3 as generated by mkvtoolnix-6.6.0
Michael Niedermayer [Sun, 19 Jan 2014 17:35:33 +0000 (18:35 +0100)]
avformat/matroskadec: support SVQ3 as generated by mkvtoolnix-6.6.0

Fixes part of Ticket3256

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5800b08572ef5f776950fc6f1b6572ba9a6b1933)

4 years agoavformat/matroskaenc: wrap V_QUICKTIME codec private in something that looks like...
Michael Niedermayer [Sun, 19 Jan 2014 19:59:28 +0000 (20:59 +0100)]
avformat/matroskaenc: wrap V_QUICKTIME codec private in something that looks like its part of quicktime stsd

This is needed for matroska spec compliance
Fixes playback of SVQ3 in matroska with vlc
Fixes Ticket 3256

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8456bd2c0f3b08756f353646fe3b40a6772e665e)

4 years agoavformat/mov: fix keyframe flags for sample from chromium Issue 340865
Michael Niedermayer [Wed, 12 Feb 2014 05:32:51 +0000 (06:32 +0100)]
avformat/mov: fix keyframe flags for sample from chromium Issue 340865

Fixes ticket #3362.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a0911b059763b8f13c70adcbbe71e10382855104)

4 years agoavformat/mov: only force parsing for video tracks if stss is empty
Hendrik Leppkes [Mon, 4 Nov 2013 15:22:27 +0000 (16:22 +0100)]
avformat/mov: only force parsing for video tracks if stss is empty

Fixes playback of some AAC streams, which are otherwise mangled by the
parser, and stss is typically only valid for video anyway.

Fixes a regression since e41ea866.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 019247bdc326a90bf20d3ce5d2413cc642e8bb08)

4 years agoavcodec/h263dec: Fix use of uninitialized memory from the bitstream buffer
Michael Niedermayer [Tue, 18 Mar 2014 17:06:17 +0000 (18:06 +0100)]
avcodec/h263dec: Fix use of uninitialized memory from the bitstream buffer

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f07cebcd910c97ff6012085c21493231752990e9)

Conflicts:

libavcodec/h263dec.c

4 years agoavcodec/utils: fix sizeof(AVFrame) dependence in avcodec_encode_audio2()
Michael Niedermayer [Mon, 17 Mar 2014 23:07:53 +0000 (00:07 +0100)]
avcodec/utils: fix sizeof(AVFrame) dependence in  avcodec_encode_audio2()

This is a bit tricky, we allocate a correctly sized AVFrame but then only
copy the compile time AVFrame size, this is to ensure that user applications
which do not use the correct av frame API dont end with out of array reads.
Note, applications using the correct API have set extended_data and the
changed code will never be executed for them.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8ab80707841a73ca7708e1e1aa97f3513fff3d35)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoswscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3()
Michael Niedermayer [Sat, 15 Mar 2014 21:52:22 +0000 (22:52 +0100)]
swscale/x86/swscale: fix missing xmm clobbers in yuv2yuvX_sse3()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6c47a4e972485e5f0c812159373f703c6f1d089f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavutil/timestamp: Warn about missing __STDC_FORMAT_MACROS for C++ use
Michael Niedermayer [Thu, 13 Mar 2014 16:32:15 +0000 (17:32 +0100)]
avutil/timestamp: Warn about missing __STDC_FORMAT_MACROS for C++ use

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8b02dfd37cb3bc9521fc6e1f5b5f13c80d144cd2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/g2meet: fix error returns
Michael Niedermayer [Sun, 2 Mar 2014 14:16:37 +0000 (15:16 +0100)]
avcodec/g2meet: fix error returns

Fixes out of array accesses

This should not affect any release

Fixes: 8ab69af9e5a7a7e20fe04cdd25c0d6e7-asan_heap-oob_e72b82_5505_cov_2278389485_g2m4.wmv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6b53c1aa822e9c92be52a462dd0aef1c2010ce73)

Conflicts:

libavcodec/g2meet.c

4 years agoavcodec/utvideoenc: fix slice_bits size
Michael Niedermayer [Sat, 1 Mar 2014 01:40:19 +0000 (02:40 +0100)]
avcodec/utvideoenc: fix slice_bits size

Fixes assertion failure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0a8c90202bb906747168a698b6837496f82c717c)

Conflicts:

libavcodec/utvideoenc.c

4 years agoconfigure: use pkg-config to detect libbluray
Timothy Gu [Mon, 24 Feb 2014 00:39:18 +0000 (16:39 -0800)]
configure: use pkg-config to detect libbluray

The current configure fails when static libbluray is compiled with libxml2
support.

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit baa650cc7946a9eb1cf5a083f61a581a97122f03)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/adpcm: squelch 'mismatch in coded sample count' warning for AV_CODEC_ID_ADPCM...
Peter Ross [Fri, 14 Mar 2014 09:02:04 +0000 (20:02 +1100)]
avcodec/adpcm: squelch 'mismatch in coded sample count' warning for AV_CODEC_ID_ADPCM_EA_R2/3

These ADPCM codecs include a per-frame flag that enables a raw 16-bit mode. Therefore
the the number of samples returned by get_nb_samples() is only ever approximate.

Fixes ticket #3460.

Signed-off-by: Peter Ross <pross@xvid.org>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7380201451a2edfb240cd356579c4c39a87cf5bd)

4 years agoavcodec/adpcm: ADPCM_IMA_DK3 packets are padded to 16-bit packet boundary
Peter Ross [Sat, 15 Mar 2014 00:16:19 +0000 (11:16 +1100)]
avcodec/adpcm: ADPCM_IMA_DK3 packets are padded to 16-bit packet boundary

Fixes ticket #3461.

Signed-off-by: Peter Ross <pross@xvid.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d1bb17940dd242e56541775318636bcbe3eab73d)

4 years agoavcodec/h264: be more tolerant on what pixel format changes trigger reinits
Michael Niedermayer [Mon, 17 Mar 2014 01:25:20 +0000 (02:25 +0100)]
avcodec/h264: be more tolerant on what pixel format changes trigger reinits

Fixes Ticket3260

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8e92ff25469f75f5c1fcbb9ba5721cea341ca34a)

4 years agoffmpeg_opt: check that a subtitle encoder is available before auto mapping streams
Michael Niedermayer [Sun, 16 Mar 2014 14:15:02 +0000 (15:15 +0100)]
ffmpeg_opt: check that a subtitle encoder is available before auto mapping streams

Fixes Ticket3470

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 25bcf24d4d0faf0191923be8afac8f67ca98b500)

4 years agomvformat/movenc: fix IMX
Michael Niedermayer [Mon, 27 Jan 2014 17:57:52 +0000 (18:57 +0100)]
mvformat/movenc: fix IMX

fixes Ticket3351

Tested-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 72d44f15834af68e2620a7051493359d7ee5b2c3)

4 years agoavformat/avidec: Check required demuxing buffer sizes in guess_ni_flag()
Michael Niedermayer [Tue, 11 Mar 2014 18:18:23 +0000 (19:18 +0100)]
avformat/avidec: Check required demuxing buffer sizes in guess_ni_flag()

Fixes Ticket3421

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5d75730c58f72918a41bb5abda4b448ecdd4273c)

4 years agoavidec: calculate missing bitrates from index
Michael Niedermayer [Tue, 11 Mar 2014 18:04:45 +0000 (19:04 +0100)]
avidec: calculate missing bitrates from index

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 01000064c9518f76bc97b72e81aa34788d88534f)

4 years agoavformat/flvdec: discard inconsistent timestamps
Michael Niedermayer [Wed, 12 Mar 2014 00:50:41 +0000 (01:50 +0100)]
avformat/flvdec: discard inconsistent timestamps

Fixes Ticket3425

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dbc3e1109cddd7ab653dce0f7758bad17b94803d)

4 years agoavcodec/vorbisdec: use the stored previous window type only when the actual previous...
Michael Niedermayer [Tue, 11 Mar 2014 19:45:29 +0000 (20:45 +0100)]
avcodec/vorbisdec: use the stored previous window type only when the actual previous is not known

Fixes Ticket3432

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5171ae781a240cac3860c20f9aefc6d1b2c61cac)

4 years agolavfi/af_atempo: clear references before returning error.
Nicolas George [Wed, 5 Mar 2014 16:59:38 +0000 (17:59 +0100)]
lavfi/af_atempo: clear references before returning error.

Once the frame has been given to ff_filter_frame(), it can
no longer be used, even on error.

Fix trac ticket #3430.
(cherry picked from commit bc6901c94944e4a81be49a6b11183cd0c55d2738)

4 years agoavformat/oggparsevorbis: dont use invalid granules
Michael Niedermayer [Wed, 5 Mar 2014 16:07:28 +0000 (17:07 +0100)]
avformat/oggparsevorbis: dont use invalid granules

Fixes Ticket3437

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 12b97dd375736c332989c50ea68af9d834b2621f)

4 years agopthread_frame: flush all threads on flush, not just the first one
Anton Khirnov [Thu, 27 Feb 2014 20:36:33 +0000 (21:36 +0100)]
pthread_frame: flush all threads on flush, not just the first one

avcodec_flush_buffers() must release all internally held references
according to its documentation, for which all the threads need to be
flushed.

Bug-Id: vlc/9665
(cherry picked from commit d1f9563d502037239185c11578cc614bdf0c5870)

Conflicts:
libavcodec/pthread_frame.c

4 years agoavcodec/h264: clear chroma planes when flags gray is used
Michael Niedermayer [Sun, 23 Feb 2014 17:20:05 +0000 (18:20 +0100)]
avcodec/h264: clear chroma planes when flags gray is used

Fixes Ticket3397
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 72e691314027b08955679319394dd0d8477973b7)

4 years agoupdate for 2.1.4 n2.1.4
Michael Niedermayer [Sun, 23 Feb 2014 16:48:16 +0000 (17:48 +0100)]
update for 2.1.4

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: Simplify get_qPy_pred()
Michael Niedermayer [Fri, 7 Feb 2014 22:28:22 +0000 (23:28 +0100)]
avcodec/hevc: Simplify get_qPy_pred()

Fixes use of uninitialized memory
Fixes: 93728afd9aa074ba14a09bfd93a632fd-asan_static-oob_124a17d_1445_cov_1021181966_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 64278039e55ffc88d231a8d760ecc257a120760a)

Conflicts:

libavcodec/hevc_filter.c

4 years agoMerge commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac'
Michael Niedermayer [Tue, 21 Jan 2014 14:42:51 +0000 (15:42 +0100)]
Merge commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac'

* commit 'e22ebd04bcab7f86548794556c28ecca46d9c2ac':
  hevc: Bound check cu_qp_delta

Conflicts:
libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a69dd1163b1a91978e596af551c9561d121aeedf)

Conflicts:

libavcodec/hevc.c

4 years agoavcodec/mpeg4videodec: Check for bitstream overread in decode_vol_header()
Michael Niedermayer [Thu, 20 Feb 2014 04:48:54 +0000 (05:48 +0100)]
avcodec/mpeg4videodec: Check for bitstream overread in decode_vol_header()

Fixes out of array read
Fixes: 08e48e9daae7d8f8ab6dbe3919e797e5-asan_heap-oob_157461c_5295_cov_1266798650_firefing.mpg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3edc3b159503d512c919b3d5902f7026e961823a)

Conflicts:

libavcodec/mpeg4videodec.c

4 years agoavcodec/h264: use subsample factors of the used pixel format
Michael Niedermayer [Fri, 21 Feb 2014 22:51:33 +0000 (23:51 +0100)]
avcodec/h264: use subsample factors of the used pixel format

Fixes out of array read
Fixes: 1cb91c36c4e55463f14aacb9bdf55b38-asan_heap-oob_106cbce_5617_cov_11212800_h264_mmx_chroma_intra_lf.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8c55ff393340998faae887dfac19e7ef128e1e58)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavformat/bink: Check return value of av_add_index_entry()
Michael Niedermayer [Mon, 17 Feb 2014 22:44:49 +0000 (23:44 +0100)]
avformat/bink: Check return value of av_add_index_entry()

Fixes null pointer dereference
Fixes: cdbf15cbd0a27cee958dd0b8800e452e-signal_sigsegv_737991_2083_cov_317652874_LBSTART.BIK
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c57fc97e956a52edc94a38ff0ecd3058b44c15b7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: more completely check the loop filter parameters
Michael Niedermayer [Sun, 16 Feb 2014 23:24:20 +0000 (00:24 +0100)]
avcodec/h264: more completely check the loop filter parameters

Fixes out of array read
Fixes: caa65cc01655505705129b677189f036-signal_sigsegv_fdcc43_2681_cov_3043376737_PPH422I5_Panasonic_A.264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 91253839e14cce9793ee93f184cef609ca8195d5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/alsdec: check predictor order against block length
Michael Niedermayer [Sun, 16 Feb 2014 12:12:39 +0000 (13:12 +0100)]
avcodec/alsdec: check predictor order against block length

Fixes out of array access
Fixes: abd3c041acbcb816be113455d138166b-asan_heap-oob_b11634_3707_cov_1707137151_als_05_2ch48k16b.mp4
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 18f94df8af04f2c02a25a7dec512289feff6517f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc_ps: Use get_bits_long() in decode_vui()
Michael Niedermayer [Sat, 15 Feb 2014 21:29:17 +0000 (22:29 +0100)]
avcodec/hevc_ps: Use get_bits_long() in decode_vui()

Fix assertion failure
Fixes: a225222ef88a0f5b1e93e1d0432debc3-asan_static-oob_124a17d_1448_cov_77608227_DBLK_E_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b818637b84948e917d11c987f2270cea5b3fcfea)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: make check for previous slice segment tighter
Michael Niedermayer [Fri, 7 Feb 2014 15:31:11 +0000 (16:31 +0100)]
avcodec/hevc: make check for previous slice segment tighter

This ensures the previous one is matching the curent and not just any

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1a3ed056c523b4670e192301be15dbc521ec8353)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: clear tab_slice_address of ctb on error.
Michael Niedermayer [Fri, 7 Feb 2014 03:30:31 +0000 (04:30 +0100)]
avcodec/hevc: clear tab_slice_address of ctb on error.

This allows us to detect which areas have failed to decode

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a18f11158216c22f4a69e44f8cbb59b300a7f10c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: hls_decode_entry: check that the previous slice segment is available...
Michael Niedermayer [Fri, 7 Feb 2014 03:32:28 +0000 (04:32 +0100)]
avcodec/hevc: hls_decode_entry: check that the previous slice segment is available before decoding the next

Fixes use of uninitialized memory
Fixes out of array read
Fixes assertion failure
Fixes part of cb307d24befbd109c6f054008d6777b5/asan_static-oob_124a175_1445_cov_2355279992_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6ef57f4d9a0920c82237facb0d1f3856b17da9dc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: clear tab_slice_address in hevc_frame_start()
Michael Niedermayer [Fri, 7 Feb 2014 01:37:18 +0000 (02:37 +0100)]
avcodec/hevc: clear tab_slice_address in hevc_frame_start()

Fixes inconsistencies
Fixes use of uninitilaized memory
Fixes part of  cb307d24befbd109c6f054008d6777b5/asan_static-oob_124a175_1445_cov_2355279992_DBLK_D_VIXS_1.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 56985d26d7054079cbe8865532c4a2cff123f596)

Conflicts:

libavcodec/hevc.c

4 years agoavcodec/h264: update current_sps & sps->new only after the whole slice header decoder...
Michael Niedermayer [Tue, 4 Feb 2014 01:20:59 +0000 (02:20 +0100)]
avcodec/h264: update current_sps & sps->new only after the whole slice header decoder and init code finished

This avoids them being cleared before the full initialization finished

Fixes out of array read
Fixes: asan_heap-oob_f0c5e6_7071_cov_1605985132_mov_h264_aac__Demo_FlagOfOurFathers.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8a3b85f3a7952c54a2c36ba1797f7e0cde9f85aa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/h264: Disallow pps_id changing between slices
Michael Niedermayer [Mon, 3 Feb 2014 22:52:38 +0000 (23:52 +0100)]
avcodec/h264: Disallow pps_id changing between slices

Such changes are forbidden in H.264 and lead to race conditions

Fixes out of array read
Fixes: signal_sigsegv_f9796a_1613_cov_3114610371_FM1_BT_B.h264
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e708424b70bef8641e8a090ec4d9e8c4490db87e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/aacdec: Fix pulse position checks in decode_pulses()
Michael Niedermayer [Mon, 3 Feb 2014 04:04:42 +0000 (05:04 +0100)]
avcodec/aacdec: Fix pulse position checks in decode_pulses()

Fixes out of array read
Fixes: asan_static-oob_1efed25_1887_cov_2013541199_HeyYa_RA10_AAC_192K_30s.rm
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6e42ccb9dbc13836cd52cda594f819d17af9afa2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/hevc: propagate error code from hls_coding_quadtree()
Michael Niedermayer [Sun, 2 Feb 2014 01:33:16 +0000 (02:33 +0100)]
avcodec/hevc: propagate error code from hls_coding_quadtree()

Fixes use of uninitialized memory
Fixes out of array read
Fixes: asan_static-oob_123cee5_2630_cov_1869071233_PICSIZE_A_Bossen_1.bin
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 96c4ba2392b9cd55a5e84cb28db5c0c7e53cd390)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/tiff: reset geotag_count in free_geotags()
Michael Niedermayer [Sun, 2 Feb 2014 00:47:36 +0000 (01:47 +0100)]
avcodec/tiff: reset geotag_count in free_geotags()

Fixes null pointer dereference
Fixes: signal_sigsegv_19d922e_3688_cov_1577641655_aletrek_tiff.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a744064c4155bde063b9e8a47699542be3b8e5eb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vc1: Check bfraction_lut_index
Michael Niedermayer [Sat, 1 Feb 2014 16:07:40 +0000 (17:07 +0100)]
avcodec/vc1: Check bfraction_lut_index

Fixes: out of array read
Fixes: asan_static-oob_1b40507_2849_SA10143.vc1
Fixes: asan_static-oob_1b40a15_2849_cov_1182297305_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_2159513432_SA10143.vc1
Fixes: asan_static-oob_1b40f15_2849_cov_3230311510_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dcf5bfbdb6137ffdca66e0b7c2929ced42732951)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vc1: factor read_bfraction() out
Michael Niedermayer [Sat, 1 Feb 2014 16:06:24 +0000 (17:06 +0100)]
avcodec/vc1: factor read_bfraction() out

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 388b4cf86ed5ec27d35eb5069769db12a4e31af0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/vc1dec: field pictures with direct mode MBs, followed by frame pictures are...
Michael Niedermayer [Sat, 1 Feb 2014 04:34:25 +0000 (05:34 +0100)]
avcodec/vc1dec: field pictures with direct mode MBs, followed by frame pictures are not supported

This case could occur when cuting and concatenating bitstreams

Fixes out of array read
Fixes: asan_heap-oob_1b33fdd_2849_cov_478905890_SA10143.vc1
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 85d51d8e327c666ac963acf25cf6a6763e6c6671)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
4 years agoavcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask size
Michael Niedermayer [Fri, 31 Jan 2014 16:57:17 +0000 (17:57 +0100)]
avcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask size

Fixes: heap array overread
Fixes: asan_heap-oob_149b2bc_6577_m1.mxg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2884688bd51a808ccda3c0e13367619cd79e0579)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>