61272 Commits

Author SHA1 Message Date
Michael Niedermayer
10e023c4fa 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>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
27a3a59428 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>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
8ab849cddc avcodec/fic: Fix return value check
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 230db1426d127a25c03b457fec25900653de2721)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
5191b00155 avcodec/dcadec: fix error message suppression code
Fixes part of Ticket3466
Found-by: Andrey_Karpov / PVS-Studio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f202af29c93f3e9b4103c3c254a8974d7c662315)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
1131e7a1a4 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>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
26becbcd2a 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>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
366cdd3548 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>
2014-05-05 00:09:17 +02:00
Stephan Soller
e3b08b3ad4 avformat/rtmpproto: Added handling of an initial RTMP chunk size packet.
Fixes ticket #2911.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-05 00:09:17 +02:00
Michael Niedermayer
fa16440659 Merge commit '79041d92ee7421853ee8c57fc13891cb0c272e0e' into release/2.2
* commit '79041d92ee7421853ee8c57fc13891cb0c272e0e':
  matroska: add the Opus mapping

Conflicts:
	libavformat/matroska.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 21:25:27 +02:00
Michael Niedermayer
c36fd16aaa Merge commit '82cebc0e0544dce507749dd9b1c2983f083de836' into release/2.2
* commit '82cebc0e0544dce507749dd9b1c2983f083de836':
  matroskadec: read the CodecDelay element

Conflicts:
	libavformat/matroska.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 21:01:38 +02:00
Michael Niedermayer
8c5897632a Merge commit 'c4e764aa6980dd9dc7c423921b415ff7261c944a' into release/2.2
* commit 'c4e764aa6980dd9dc7c423921b415ff7261c944a':
  rtmpproto: Make sure to pass on the error code if read_connect failed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 20:54:43 +02:00
Michael Niedermayer
b34fce9c54 Merge commit '9d02e38d3f03100784348ff75fd181d2aaad7e43' into release/2.2
* commit '9d02e38d3f03100784348ff75fd181d2aaad7e43':
  lavr: allocate the resampling buffer with a positive size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 20:14:18 +02:00
Michael Niedermayer
742f9aa879 Merge commit '0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb' into release/2.2
* commit '0f6e309b97e3da83a0fa75fbf1c4b50cd72047eb':
  mp3enc: Properly write bitrate value in XING header

Conflicts:
	libavformat/mp3enc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-05-04 20:13:41 +02:00
Anton Khirnov
79041d92ee matroska: add the Opus mapping
(cherry picked from commit 141fdc763c2841b572d29a2ad78513e8d5325870)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-05-03 16:22:58 -04:00
Anton Khirnov
82cebc0e05 matroskadec: read the CodecDelay element
(cherry picked from commit eb3b5501e8b85bfea09d533314cb6920efc42639)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>

Conflicts:
	libavformat/matroskadec.c
2014-05-03 13:50:26 -04:00
Michael Niedermayer
09abca6802 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)
2014-05-01 18:23:30 +02:00
Michael Niedermayer
43d64829e6 avcodec/vorbisdec: try to workaround libvorbisenc bug
Fixes Ticket3590

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0a266cb55af9794fc5cff695d35cae4111e4334f)
2014-05-01 18:22:19 +02:00
Michael Niedermayer
4a479fd3e6 swresample: fix AV_CH_LAYOUT_STEREO_DOWNMIX input
Fixes Ticket 3542

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 291d464161a5bf3b566bc147f83e4242b0c18d74)
2014-04-24 08:59:56 +02:00
Michael Niedermayer
4f41717d01 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)
2014-04-24 08:56:58 +02:00
Michael Niedermayer
6896dcbf5f avformat/avidec: Speed up keyframe detection code
Fixes Ticket3531

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57fb570908df2e84b11635f12b5be1fb27f053eb)
2014-04-23 17:11:23 +02:00
Stefano Sabatini
14404170b9 ffprobe: fix scaling of vali in value_string() in case -prefix is selected
Fix trac ticket #3523.
(cherry picked from commit 1ba59b1cbeafe7cd28db04f772abd89eb7e4ce1e)
2014-04-23 17:11:16 +02:00
Michael Niedermayer
e9e42beed2 avformat/asfenc: dont allow non interleaved packets
The muxer does not support this currently

Fixes ticket #3547.
Fixes ticket #3555.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 369cdf917aaa5d7fbc61d57f87e638772e806716)
(cherry picked from commit 514ec9bece86fed440ac829c10e82c4a0569c3a5)
2014-04-23 17:10:26 +02:00
Michael Niedermayer
abd6decd55 avformat/pmpdec: remove cur_dts timestamp hack
It appears the demuxer works fine without it

Fixes Ticket3534

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5b19fc7aae986d6fa3d689f581b37e4bfba4f2d0)
2014-04-23 17:01:36 +02:00
Michael Niedermayer
0385c824f1 avformat: Fix decoder search in find stream info
Fixes Ticket3548

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f3743901d7df906342f99b179382b19d8a4d9716)
2014-04-23 16:58:23 +02:00
Martin Storsjö
c4e764aa69 rtmpproto: Make sure to pass on the error code if read_connect failed
Previously, if read_connect failed, the ret variable was unmodified
and had the value 0, indicating success, which then was returned from
the rtmp_open function, even though it actually failed.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 6477139721f559b26eafd415e23e13ea2b0c27e1)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-04-19 22:03:57 -04:00
Anton Khirnov
9d02e38d3f lavr: allocate the resampling buffer with a positive size
This fixes cases where very few input samples (fewer than needed for one
output sample) are passed to lavr at the beginning.
CC:libav-stable@libav.org

(cherry picked from commit ac976ed91e323754e9a84509873ebdb437372797)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-04-19 22:03:29 -04:00
Peter Ross
30cf47c6f0 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
2014-04-19 13:00:57 +02:00
Peter Ross
b45cd17d29 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)
2014-04-19 12:59:18 +02:00
Carl Eugen Hoyos
26b6d70c72 Do not overwrite VDPAU structures in ff_MPV_frame_start().
Fixes crashes with VDR and MPlayer as reported by irc user crow.
(cherry picked from commit 941b2240f2ce59c41f4a9ffec88c512f64c75613)
2014-04-18 10:32:43 +02:00
Anh
32919db4fb Fix compilation with --disable-everything --enable-muxer=avi --disable-network.
Fixes ticket #3568.
(cherry picked from commit c150e2cf324ce0572bb8b9b3501c45465cfbf360)
2014-04-16 20:07:51 +02:00
Michael Niedermayer
56f44c26f0 avutil/avstring: do not lose ascii characters when decoding non utf-8 with av_utf8_decode()
Fixes Ticket3363

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a31547ce2e5c46d7a7005fe70dcf9b3a7c5fc4ac)
2014-04-16 19:20:20 +02:00
Michael Niedermayer
fe87a40de6 ffprobe: do not lose non ascii characters in non utf8 strings
Fixes Ticket3363

Using U+FFFD REPLACEMENT CHARACTER as suggested by nicolas

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ca6dd53a734d6fc453de425340d7e9ec4ef385b5)
2014-04-16 19:20:03 +02:00
Michael Niedermayer
0f6e309b97 mp3enc: Properly write bitrate value in XING header
Instead of using a fixed bitrate_idx, calculate a matching bitrate for
the XING header.

Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1)
to report wrong bitrate and bitrate mode when using CBR.

Bug-Id: https://bugs.debian.org/736088

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 617a1a98a6be3e59db6fbfc21afab2fb9a049c03)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
2014-04-12 10:49:30 -04:00
Derek Buitenhuis
96e13c9897 libx265: Use x265_param_parse to set the SAR
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
(cherry picked from commit 8945dcbb52b6b87e1e6479912cce89c7da54ec43)

Conflicts:
	libavcodec/libx265.c
2014-04-11 16:45:33 -03:00
Michael Niedermayer
e72c0a0466 update for 2.2.1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n2.2.1
2014-04-10 05:09:51 +02:00
Anthoine Bourgeois
dfddefa13a 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
ce94955b3c 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
dde95268cc 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
d20ac551a8 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
352b0969e2 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
b479b42b26 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
36cab9c408 avcodec/pthread_frame: fix missing unlock on error
Fixes CID1197057
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f87b3d552394cd03c1e9f180553d41600c575c69)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
34592d04fb examples/avio_reading: fix null dereference on error
Fixed CID1197052
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 419800acc46afc0c3b7319d6e216d0da207ebbb7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
544accc895 avformat/omadec: fix probetest failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a84f9c75bc3f55fed4f68d2503a08ab70c76ecbe)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
f41622ecb4 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>
2014-04-10 04:53:00 +02:00
Lukasz Marek
fc8eb4c1f9 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
02bae9f013 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
2014-04-10 04:53:00 +02:00
Michael Niedermayer
5cb2a1c3f0 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
a221c9bd76 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>
2014-04-10 04:53:00 +02:00
Michael Niedermayer
b2583c2b62 Merge commit 'e0aa76d38a02090245284fc157afb9074e9ff073' into release/2.2
* commit 'e0aa76d38a02090245284fc157afb9074e9ff073':
  golomb: Fix the implementation of get_se_golomb_long

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-04-10 04:46:00 +02:00