OSDN Git Service

android-x86/external-ffmpeg.git
9 years agoavformat/riffenc: Filter out "BottomUp" in ff_put_bmp_header()
Benoit Fouet [Tue, 23 Sep 2014 08:07:10 +0000 (10:07 +0200)]
avformat/riffenc: Filter out "BottomUp" in ff_put_bmp_header()

Fixes Ticket1304

Commit message and extradata size bugfix by commiter
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6843b9dc78bc966bb30121828ef4f6b6755cf877)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/webp: fix default palette color 0xff000000 -> 0x00000000
Pascal Massimino [Mon, 22 Sep 2014 21:48:57 +0000 (14:48 -0700)]
avcodec/webp: fix default palette color 0xff000000 -> 0x00000000

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/libilbc: support for latest git of libilbc
Gianluigi Tiesi [Fri, 19 Sep 2014 02:49:36 +0000 (04:49 +0200)]
avcodec/libilbc: support for latest git of libilbc

in the latest git commits of libilbc developers removed WebRtc_xxx typedefs

This commit uses int types instead,
it's safe to apply also for previous versions since
WebRtc_Word16 was always a typedef of int16_t and
WebRtc_UWord16 a typedef of uint16_t

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agox86/dsputil: add emms to ff_scalarproduct_int16_mmxext()
James Almer [Wed, 5 Mar 2014 22:44:36 +0000 (19:44 -0300)]
x86/dsputil: add emms to ff_scalarproduct_int16_mmxext()

Also undo the changes to ra144enc.c from previous commits.
Should fix ticket #3429

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e0e1f9067430de1655a7b28536b5afed48bded5)

Conflicts:

libavcodec/ra144enc.c

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agolibavcodec/webp: treat out-of-bound palette index as translucent black
Pascal Massimino [Tue, 16 Sep 2014 15:01:07 +0000 (17:01 +0200)]
libavcodec/webp: treat out-of-bound palette index as translucent black

See https://code.google.com/p/webp/issues/detail?id=206
for a description of the problem/fix.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This patch makes the decoder follow the recommendation of the spec.
There is some disagreement (see "[FFmpeg-devel] [PATCH]: libavcodec/webp")
about what would be best to be written in the spec, so in case the spec
is changed again, this potentially would need to be amended or reverted
(cherry picked from commit 4fd21d58a72c38ab63c3a4483b420db260fa7b8d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoapetag: Fix APE tag size check
Katerina Barone-Adesi [Mon, 15 Sep 2014 23:40:24 +0000 (01:40 +0200)]
apetag: Fix APE tag size check

The size variable is (correctly) unsigned, but is passed to several functions
which take signed parameters, such as avio_read, sometimes after having
numbers added to it. So ensure that size remains within the bounds that
these functions can handle.

CC: libav-stable@libav.org
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit c5560e72d0bb69f8a1ac9536570398f84388f396)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agotools/crypto_bench: fix build when AV_READ_TIME is unavailable
Michael Niedermayer [Tue, 16 Sep 2014 16:04:51 +0000 (18:04 +0200)]
tools/crypto_bench: fix build when AV_READ_TIME is unavailable

Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4a99134f1a71994a0dc4542a0d6bee8e36146b60)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/m4vdec: Check for non startcode 00 00 00 sequences in probe
Michael Niedermayer [Sun, 7 Sep 2014 14:39:39 +0000 (16:39 +0200)]
avformat/m4vdec: Check for non startcode 00 00 00 sequences in probe

Fixes miss detection of PCM as m4v
Fixes Ticket 3928

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mpegvideo: Set err on failure in ff_mpv_common_frame_size_change()
Michael Niedermayer [Sun, 7 Sep 2014 12:14:52 +0000 (14:14 +0200)]
avcodec/mpegvideo: Set err on failure in ff_mpv_common_frame_size_change()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mpegvideo: check that the context is initialized in ff_mpv_common_frame_size_...
Michael Niedermayer [Sun, 7 Sep 2014 11:00:47 +0000 (13:00 +0200)]
avcodec/mpegvideo: check that the context is initialized in ff_mpv_common_frame_size_change()

The function otherwise would initialize the context without setting context_initialized
alternatively we could set context_initialized

Fixes valgrind anomalies related to ticket 3928

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mpegvideo: Use "goto fail" for all error paths in ff_mpv_common_frame_size_ch...
Michael Niedermayer [Sun, 7 Sep 2014 10:52:24 +0000 (12:52 +0200)]
avcodec/mpegvideo: Use "goto fail" for all error paths in ff_mpv_common_frame_size_change()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/h264: Allow partial escaping
Michael Niedermayer [Sat, 6 Sep 2014 23:42:28 +0000 (01:42 +0200)]
avcodec/h264: Allow partial escaping

Fixes Ticket3923

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/swfdec: Do not change the pixel format
Michael Niedermayer [Tue, 2 Sep 2014 14:42:33 +0000 (16:42 +0200)]
avformat/swfdec: Do not change the pixel format

This is currently not supported
Fixes part of Ticket 3539

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/swfdec: Use side data to communicate w/h changes to the decoder
Michael Niedermayer [Tue, 2 Sep 2014 03:22:26 +0000 (05:22 +0200)]
avformat/swfdec: Use side data to communicate w/h changes to the decoder

Fixes reading from freed data
Fixes part of Ticket3539

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1c55d0ff3202a04ebc67a72d72391104e9bdb633)

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agosegment: don't access outside seg->frames array
Mika Raento [Mon, 1 Sep 2014 17:10:03 +0000 (20:10 +0300)]
segment: don't access outside seg->frames array

Fixes wrong number of segments output and undefined memory access.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agooggdec: fix invalid free on error
wm4 [Sat, 30 Aug 2014 13:39:15 +0000 (15:39 +0200)]
oggdec: fix invalid free on error

The read_packet callback passes a pointer to a stack-allocated AVPacket.
Attempting to free it with av_free() makes no sense.

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

Conflicts:

libavformat/oggdec.c
(cherry picked from commit a82401b7284e05e2cf6fb89aeed53738af06a7fd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/snow: check coeffs for validity
Michael Niedermayer [Sat, 30 Aug 2014 00:12:10 +0000 (02:12 +0200)]
avcodec/snow: check coeffs for validity

Fixes deadlock
Fixes integer overflow
Fixes Ticket 3892

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agobktr: Fix Fabrice's name
Timothy Gu [Tue, 26 Aug 2014 23:13:52 +0000 (16:13 -0700)]
bktr: Fix Fabrice's name

Signed-off-by: Timothy Gu <timothygu99@gmail.com>
This file with the incorrect name was added after the name was fixed in all other files.
This is thus fixing a mistake

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/utils: add GBRP16 to avcodec_align_dimensions2()
Michael Niedermayer [Sun, 24 Aug 2014 21:33:40 +0000 (23:33 +0200)]
avcodec/utils: add GBRP16 to avcodec_align_dimensions2()

Fixes Ticket3869

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec: fix aac/ac3 parser bitstream buffer size
Michael Niedermayer [Thu, 21 Aug 2014 23:15:57 +0000 (01:15 +0200)]
avcodec: fix aac/ac3 parser bitstream buffer size

Buffers containing copies of the AAC and AC3 header bits were not padded
before parsing, violating init_get_bits() buffer padding requirement,
leading to potential buffer read overflows.
This change adds FF_INPUT_BUFFER_PADDING_SIZE bytes to the bit buffer
for parsing the header in each of aac_parser.c and ac3_parser.c.

Based on patch by: Matt Wolenetz <wolenetz@chromium.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit fccd85b9f30525f88692f53134eba41f1f2d90db)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agowavpackenc: proper buffer allocation
Christophe Gisquet [Tue, 19 Aug 2014 12:26:49 +0000 (12:26 +0000)]
wavpackenc: proper buffer allocation

The allocation didn't account for headers, that can be easily 79 bytes.
As a result, buffers allocated for a few samples (e.g. 5 in the original
bug) could be undersized.

Fixed ticket #2881.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2ba58bec20b0039ccc40cfba59af6d56de16e8b1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agowavpack: report if there is no bits left
Christophe Gisquet [Tue, 19 Aug 2014 12:26:47 +0000 (12:26 +0000)]
wavpack: report if there is no bits left

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 11a39bdf534a4ead634b4a593c66ebf756910b9b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoproresenc_kostya: properly account for alpha
Christophe Gisquet [Mon, 11 Aug 2014 17:43:27 +0000 (19:43 +0200)]
proresenc_kostya: properly account for alpha

The packet buffer allocation considered as dct-coded, while it is
actually run-coded and thus requires a larger buffer.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoproresenc_kostya: report buffer overflow
Christophe Gisquet [Mon, 11 Aug 2014 22:06:08 +0000 (22:06 +0000)]
proresenc_kostya: report buffer overflow

If the allocated size, despite best efforts, is too small, exit
with the appropriate error.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoproresenc_kostya: remove unneeded parameters
Christophe Gisquet [Mon, 11 Aug 2014 22:06:07 +0000 (22:06 +0000)]
proresenc_kostya: remove unneeded parameters

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/snow: fix null pointer dereference in cleanup after allocation failure
Michael Niedermayer [Mon, 11 Aug 2014 13:36:22 +0000 (15:36 +0200)]
avcodec/snow: fix null pointer dereference in cleanup after allocation failure

Fixes: snowf.avi
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9a162146ca6cc12ef7ad4a15164349482885962c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/iff: check pixfmt for rgb8 / rgbn
Michael Niedermayer [Sun, 10 Aug 2014 19:59:33 +0000 (21:59 +0200)]
avcodec/iff: check pixfmt for rgb8 / rgbn

Fixes out of array access

Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3539d6c63a16e1b2874bb037a86f317449c58770)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agocdgraphics: do not return 0 from the decode function
Anton Khirnov [Wed, 6 Aug 2014 10:56:34 +0000 (10:56 +0000)]
cdgraphics: do not return 0 from the decode function

0 means no data consumed, so it can trigger an infinite loop in the
caller.

CC:libav-stable@libav.org
(cherry picked from commit c7d9b473e28238d4a4ef1b7e8b42c1cca256da36)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffserver: initialize pbuffer in prepare_sdp_description()
Michael Niedermayer [Sat, 2 Aug 2014 12:03:30 +0000 (14:03 +0200)]
ffserver: initialize pbuffer in prepare_sdp_description()

also check pbuffer before use

Found-by: CSA
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 1d8d21b90ab91aa471f369e0f9d1ea20fb40733b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/wavpackenc: Fix log2sample() result value
Michael Niedermayer [Sat, 2 Aug 2014 16:15:12 +0000 (18:15 +0200)]
avcodec/wavpackenc: Fix log2sample() result value

Found-by: CSA
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e706fe764049b3f1ccf10ba9f686426a4c007906)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/tee: flip assigment direction
Michael Niedermayer [Sat, 2 Aug 2014 20:30:03 +0000 (22:30 +0200)]
avformat/tee: flip assigment direction

Found-by: CSA
Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2e6fdcb7f3c86491408a3699f0aa9dc52b7c5686)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoffmpeg_opt: Use av_guess_codec() instead of AVOutputFormat->*codec
Michael Niedermayer [Sat, 2 Aug 2014 01:29:42 +0000 (03:29 +0200)]
ffmpeg_opt: Use av_guess_codec() instead of AVOutputFormat->*codec

Fixes part of ticket2236

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dvdsub_parser: print message if packet is smaller than the packet size field
Michael Niedermayer [Fri, 1 Aug 2014 23:16:14 +0000 (01:16 +0200)]
avcodec/dvdsub_parser: print message if packet is smaller than the packet size field

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dvdsub_parser: Check buf_size before reading 32bit packet size
Michael Niedermayer [Fri, 1 Aug 2014 23:15:37 +0000 (01:15 +0200)]
avcodec/dvdsub_parser: Check buf_size before reading 32bit packet size

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/dvdsub_parser: never return 0 when the input isnt 0
Michael Niedermayer [Fri, 1 Aug 2014 22:27:23 +0000 (00:27 +0200)]
avcodec/dvdsub_parser: never return 0 when the input isnt 0

Fixes a infinite loop
Fixes Ticket3804

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agov4l2enc: adding AVClass
Anshul Maheswhwari [Thu, 31 Jul 2014 15:29:59 +0000 (20:59 +0530)]
v4l2enc: adding AVClass

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/avidec: fix handling dv in avi
Michael Niedermayer [Fri, 21 Nov 2014 02:08:20 +0000 (03:08 +0100)]
avformat/avidec: fix handling dv in avi

Fixes Ticket4086

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

9 years agoavformat/oggparseopus: Check opus_duration() return value
James Almer [Thu, 12 Dec 2013 06:34:19 +0000 (03:34 -0300)]
avformat/oggparseopus: Check opus_duration() return value

Regression since 39d11d599cd292485fe991cd22e10d7a1738b3bc

os->pduration would be wrongly assigned a negative value on invalid packets
instead of aborting.

Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c619e14c314b44d86a8d552259afb957c0b6775d)

9 years agoavformat/oggparseopus: calculate pts/dts for initial packets after seeking
Michael Niedermayer [Thu, 11 Sep 2014 21:50:35 +0000 (23:50 +0200)]
avformat/oggparseopus: calculate pts/dts for initial packets after seeking

based on code from oggparsevorbis
Fixes Ticket3124
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7f39352a1b661771cf471986059027acd8e0e31f)

Fixes ticket #3943.

9 years agoavformat/oggparseopus: factor opus_duration() out
Michael Niedermayer [Wed, 11 Dec 2013 03:15:38 +0000 (04:15 +0100)]
avformat/oggparseopus: factor opus_duration() out

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

9 years agovc1: Do not return an error when skipping b frames
Alessandro Ghedini [Mon, 21 Apr 2014 17:10:52 +0000 (19:10 +0200)]
vc1: Do not return an error when skipping b frames

This caused mpv (and possibly others) to fallback to software decoding after
seeking a VC1 stream.

Bug-Id: 667

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit cdf6eb5a9710566be217a3f17d3d94ac4e4d2662)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/dv: implement fallback in dv_extract_pack()
Michael Niedermayer [Thu, 17 Jul 2014 02:25:21 +0000 (04:25 +0200)]
avformat/dv: implement fallback in dv_extract_pack()

Fixes Ticket2340
Fixes Ticket2341

Based-on mail from Dave Rice <dave@dericed.com>
Tested-by: Dave Rice <dave@dericed.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 88f038ac97a875f25c2eceac6d2107a09314984c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc: treat current_sps like sps_list
Michael Niedermayer [Tue, 15 Jul 2014 19:43:30 +0000 (21:43 +0200)]
avcodec/hevc: treat current_sps like sps_list

This simplifies the management of current_sps
Fixes Ticket3458

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

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc_ps: prevent stale pointer in malloc failure case
Michael Niedermayer [Tue, 15 Jul 2014 19:43:04 +0000 (21:43 +0200)]
avcodec/hevc_ps: prevent stale pointer in malloc failure case

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

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc_ps: do not loose all reference to pointers still in use
Michael Niedermayer [Sat, 12 Jul 2014 04:36:25 +0000 (06:36 +0200)]
avcodec/hevc_ps: do not loose all reference to pointers still in use

Fixes leaving a pointer to unreferenced memory
Fixes Ticket 3115

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

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

Conflicts:

libavcodec/hevc.c

9 years agoffmpeg: Use av_stream_get_parser() to avoid ABI issues
Michael Niedermayer [Mon, 14 Jul 2014 19:06:58 +0000 (21:06 +0200)]
ffmpeg: Use av_stream_get_parser() to avoid ABI issues

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

Conflicts:

ffmpeg.c
(cherry picked from commit 8fae6207e30059611cdc788ad440b6831637f86f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat: add av_stream_get_parser() to access avformat AVParser
Michael Niedermayer [Mon, 14 Jul 2014 19:03:43 +0000 (21:03 +0200)]
avformat: add av_stream_get_parser() to access avformat AVParser

The AVStream.parser field is considered private and its location cannot be
preserved while preserving also ABI compatibility to libav, as libav added fields
before it.
Some tools like ffmpeg.c access this field though

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

Conflicts:

RELEASE_NOTES
doc/APIchanges
libavformat/utils.c
libavformat/version.h
(cherry picked from commit a78e6363e9a7ef90bd1ff4aeceee8e5501cbc6d4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/utils: do not wait for packets from discarded streams for genpts
Michael Niedermayer [Sat, 12 Jul 2014 23:07:59 +0000 (01:07 +0200)]
avformat/utils: do not wait for packets from discarded streams for genpts

Fixes long loop
Fixes Ticket3208

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/hevc: Use av_malloc(z)_array()
Michael Niedermayer [Tue, 1 Jul 2014 01:50:17 +0000 (03:50 +0200)]
avcodec/hevc: Use av_malloc(z)_array()

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

Conflicts:

libavcodec/hevc.c

9 years agoavfilter/x86/vf_pullup: fix old typo
Michael Niedermayer [Wed, 25 Jun 2014 16:10:12 +0000 (18:10 +0200)]
avfilter/x86/vf_pullup: fix old typo

This makes C and MMX match, no change to fate as the differences where
apparently not sufficient to show up in fate

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavfilter/vf_pullup: use ptrdiff_t as stride argument for dsp functions
Michael Niedermayer [Wed, 25 Jun 2014 15:49:03 +0000 (17:49 +0200)]
avfilter/vf_pullup: use ptrdiff_t as stride argument for dsp functions

This should avoid issues on x86_64

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoupdate for FFmpeg 2.1.5
Michael Niedermayer [Mon, 23 Jun 2014 15:46:48 +0000 (17:46 +0200)]
update for FFmpeg 2.1.5

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/mpc: attempt to allocate a packet that is not smaller than the data inside it
Michael Niedermayer [Sat, 14 Jun 2014 22:49:02 +0000 (00:49 +0200)]
avformat/mpc: attempt to allocate a packet that is not smaller than the data inside it

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agocavsdec: fix qp fixed slice handling
Michael Niedermayer [Mon, 9 Jun 2014 03:47:49 +0000 (05:47 +0200)]
cavsdec: fix qp fixed slice handling

Fixes Ticket3400

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/cavsvideodec: Fix probing when the file extension is avs
Michael Niedermayer [Mon, 9 Jun 2014 03:17:34 +0000 (05:17 +0200)]
avformat/cavsvideodec: Fix probing when the file extension is avs

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/alsdec: Clear MPEG4AudioConfig so that no use of uninitialized memory is...
Michael Niedermayer [Sun, 8 Jun 2014 12:30:30 +0000 (14:30 +0200)]
avcodec/alsdec: Clear MPEG4AudioConfig so that no use of uninitialized memory is possible

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format...
Michael Niedermayer [Sat, 7 Jun 2014 10:03:31 +0000 (12:03 +0200)]
avformat/flvenc: Do not allow creating h263/mpeg4 in flv without unofficial format extensions being enabled.

Found-by: Jean-Baptiste Kempf <jb@videolan.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 74760883fcb4443d105814ed246b3cf51d7e9dca)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/aic: fix quantization table permutation
Michael Niedermayer [Thu, 5 Jun 2014 21:21:15 +0000 (23:21 +0200)]
avcodec/aic: fix quantization table permutation

Fixes Ticket3700

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mss4: Fix () in MKVAL() macro
Michael Niedermayer [Sun, 25 May 2014 03:19:09 +0000 (05:19 +0200)]
avcodec/mss4: Fix () in MKVAL() macro

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mss34dsp: fix () in SOP* macros
Michael Niedermayer [Sun, 25 May 2014 03:18:47 +0000 (05:18 +0200)]
avcodec/mss34dsp: fix () in SOP* macros

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/mlpdec: fix () in MSB_MASK() macro
Michael Niedermayer [Sun, 25 May 2014 03:17:51 +0000 (05:17 +0200)]
avcodec/mlpdec: fix () in MSB_MASK() macro

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/ivi_dsp: add some missing () to macros
Michael Niedermayer [Sun, 25 May 2014 01:39:08 +0000 (03:39 +0200)]
avcodec/ivi_dsp: add some missing () to macros

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/h264: fix () in macros
Michael Niedermayer [Sun, 25 May 2014 01:30:13 +0000 (03:30 +0200)]
avcodec/h264: fix () in macros

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/golomb-test: fix () in EXTEND() macro
Michael Niedermayer [Sun, 25 May 2014 01:27:56 +0000 (03:27 +0200)]
avcodec/golomb-test: fix () in EXTEND() macro

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/aac: fix () in IS_CODEBOOK_UNSIGNED macro
Michael Niedermayer [Sun, 25 May 2014 01:19:47 +0000 (03:19 +0200)]
avcodec/aac: fix () in IS_CODEBOOK_UNSIGNED macro

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 years agoavcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE
Michael Niedermayer [Wed, 21 May 2014 01:02:06 +0000 (03:02 +0200)]
avcodec/libvorbisenc: dont add the duration to AV_NOPTS_VALUE

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>