41188 Commits

Author SHA1 Message Date
Michael Niedermayer
faeb2b3e69 rmdec: flush audio packet on seeking
Fixes Ticket1605

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 23:11:46 +01:00
Michael Niedermayer
fff5f65540 Merge remote-tracking branch 'jamrial/release/0.11' into release/0.11
* jamrial/release/0.11:
  lavc/bink: Chech for malloc failure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:10:40 +01:00
Alexander Kojevnikov
7cb24ecd4c mp3dec: Fix VBR bit rate parsing
When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag.

When parsing the stream, don't override the bit rate if it's already set,
otherwise calculate the mean bit rate from parsed frames. This way, the bit
rate will be set correctly both for CBR and VBR streams.

Signed-off-by: Alexander Kojevnikov <alexander@kojevnikov.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 29d8cd265a536063420afe78375b2176a9e1abc5)

Conflicts:

	tests/ref/lavf-fate/mp3

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Michael Niedermayer
9faf323d7e doc/APIchanges: List merge commit hashes and version numbers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Michael Niedermayer
78317ad8b9 apichanges: fix 2 wrong hashes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2f3bc5122822687dc388f7352c92cf6db456cf7c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Michael Niedermayer
753c6377d3 apichanges: Use , instead of / to seperate multiple hashes
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 33d6330652c088dadde163da569b1a2f6c7603c0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Michael Niedermayer
c3a5e7be84 apichanges: fix date
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ad6802f975a91bf6757fe3729ef8c6f10e6796b7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Michael Niedermayer
ad35215750 doc/APIchanges: fix odd .01 versions
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f16cb9e50a5a196af9244dc7d33ed193227528a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Diego Biurrun
8e2c8aaba4 configure: Make warnings from -Wreturn-type fatal errors
These warnings have no false positives and point to serious bugs.
(cherry picked from commit 99853cb8d4237b810b2fffb4a34f66fd0064ef72)

Conflicts:

	configure

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Michael Niedermayer
b5469fec6a movenc: hotfix, dont store fiel for h264 / mpeg4-asp / dnxhd
Other software does not store it in this case, and the information
is provided by the codec stream

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

Conflicts:

	tests/ref/lavf/mov
	tests/ref/seek/lavf_mov
	tests/ref/vsynth/vsynth1-dnxhd-1080i
	tests/ref/vsynth/vsynth1-mpeg4
	tests/ref/vsynth/vsynth2-dnxhd-1080i
	tests/ref/vsynth/vsynth2-mpeg4
2013-03-20 22:02:28 +01:00
Michael Niedermayer
864a7e73b9 huffyuvdec: Skip len==0 cases
Fixes vlc decoding for hypothetical files that would contain such cases.

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

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

Conflicts:

	libavcodec/huffyuv.c
2013-03-20 22:02:28 +01:00
Michael Niedermayer
562aa82d2a huffyuvdec: Check init_vlc() return codes.
Prevents out of array writes

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f67a0d115254461649470452058fa3c28c0df294)

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

Conflicts:

	libavcodec/huffyuv.c
2013-03-20 22:02:28 +01:00
Xi Wang
3fb1a6c702 rtmp: fix buffer overflows in ff_amf_tag_contents()
A negative `size' will bypass FFMIN().  In the subsequent memcpy() call,
`size' will be considered as a large positive value, leading to a buffer
overflow.

Change the type of `size' to unsigned int to avoid buffer overflow, and
simplify overflow checks accordingly.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e692374f7962ea358c329de38c380103f8991b6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Xi Wang
dd64626022 rtmp: fix multiple broken overflow checks
Sanity checks like `data + size >= data_end || data + size < data' are
broken, because `data + size < data' assumes pointer overflow, which is
undefined behavior in C.  Many compilers such as gcc/clang optimize such
checks away.

Use `size < 0 || size >= data_end - data' instead.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 902cfe2f74d777a7dc20ac68f2393b9f84b790c1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
Xi Wang
a31be9dd06 rtpenc: fix overflow checking in avc_mp4_find_startcode()
The check `start + res < start' is broken since pointer overflow is
undefined behavior in C.  Many compilers such as gcc/clang optimize
away this check.

Use `res > end - start' instead.  Also change `res' to unsigned int
to avoid signed left-shift overflow.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2f014567cfd63e58156f60666f1a61ba147276ab)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-03-20 22:02:28 +01:00
James Almer
c095137d1b lavc/bink: Chech for malloc failure
Based on commit 8ab2173ed141aa2c3336be7f9880340dfb8dcf5e
2013-03-20 17:51:15 -03:00
Carl Eugen Hoyos
b63dbe2220 Do not (re-)set libx264 parameter b_tff if interlaced encoding was not requested.
Reconfiguring can break x264 lossless encoding.

Fixes ticket #2165.
(cherry picked from commit 75c7e4583f4fd727d236a12763a265502fe00988)
2013-03-18 02:19:13 +01:00
Michael Niedermayer
5df2dc0f94 aacsbr: Check for envelope scalefactors overflowing
This prevents various values from becoming stuck at NAN and
output to become silent
If someone knows a cleaner solution, thats welcome!

Fixes Ticket2335

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8978c743fb1d1f5a0d6dbdd83ff05817f8a41230)
2013-03-08 20:09:20 +01:00
Carl Eugen Hoyos
4b03f2c522 Require at least three frames to autodetect loas.
(cherry picked from commit a60530e3ee1d9532c026a52b03661f88e163d647)
2013-03-02 02:05:07 +01:00
Nicolas George
a8b92c4b3c lavf/avio: check for : in filenames for protocols.
If the first "special" character in a filename is a comma,
it can introduce protocol options, but only if there is a
colon at the end. Otherwise, it is just a filename with a
comma.

Fix trac ticket #2303.
(cherry picked from commit d9fad53f4b447db1e436dcf3fc4a57e604616e6c)
2013-03-01 08:57:53 +01:00
Carl Eugen Hoyos
381e3e7e44 Revert "swfenc: use av_get_audio_frame_duration() instead of AVCodecContext.frame_size"
This reverts commit 620b88a302d522f71a6a95aff500cf7bd8520043.

Fixes ticket #2272.
2013-02-17 20:55:37 +01:00
Carl Eugen Hoyos
ec18baadfa Write the fiel atom to mov files independently of the used video coded.
The QuickTime specification does not contain any hint that the atom
must not be written in some cases and both the QuickTime and the
AVID decoders do not fail if the atom is present.

This change allows to signal (visually) interlaced streams with
a codec different from uncompressed video.

As a side-effect, this fixes ticket #2202
(cherry picked from commit 7d0e3b197c817b307d599a23704a44763ed0bbdd)

Conflicts:
	libavformat/movenc.c
	tests/ref/lavf/mov
	tests/ref/seek/lavf_mov
	tests/ref/vsynth/vsynth1-avui
	tests/ref/vsynth/vsynth1-dnxhd-1080i
	tests/ref/vsynth/vsynth1-mpeg4
	tests/ref/vsynth/vsynth2-avui
	tests/ref/vsynth/vsynth2-dnxhd-1080i
	tests/ref/vsynth/vsynth2-mpeg4
2013-02-14 15:43:15 +01:00
Carl Eugen Hoyos
2f98537ea0 sws: dont write out of array on bigendian
Fixes Ticket2229

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4e2c63685e031e28d2296cff76473b963ee62ba1)
2013-02-14 14:40:26 +01:00
Michael Niedermayer
ebe645f02b h264: Reset last_pocs in case of reference or frame number inconsistencies
This prevents faulty increasing of has_b_frames
Should fix Ticket 2062

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c230af9bccc3cadb373f9007ba14fffb6c2acc75)
2013-02-14 09:24:11 +01:00
Michael Niedermayer
470ee0c660 h264_refs: Print default in case we are missing a reference.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a39d36146a40cb52b3560fd02c73eccf72603b8f)
2013-02-14 09:24:08 +01:00
Michael Niedermayer
3cecef5b03 ffmpeg: dont allow -flags to override -pass
Fixes Ticket2154

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

Conflicts:
	ffmpeg_opt.c
2013-02-06 10:17:32 +01:00
Peter Ross
155a0bed97 wtvdec: demux thumbnail picture to AVStream.attached_pic
Fixes ticket #2133.

(cherry picked from commit 508836932fcbc3c109fcc4df7a2f2b0bf21bbece)

Conflicts:
	libavformat/wtvdec.c
2013-01-30 10:00:38 +01:00
Carl Eugen Hoyos
ebb3a5974f matroskaenc: add codec_tag lists back.
This reverts 312645e :
"Do not set codec_tag property for matroska muxers."

Also adds dummy codec_tag lists with codecs
supported in mkv but not in wav / avi.

Fixes ticket #2169.
(cherry picked from commit df39c3ce385c02cbd8046298578ea7454c0a0f81)

Conflicts:
	libavformat/matroskaenc.c
2013-01-24 02:39:28 +01:00
Carl Eugen Hoyos
91e016865c Fix detection of struct v4l2_frmsize_discrete.
It was always detected successfully.
2013-01-17 02:42:17 +01:00
Michael Niedermayer
16b0b75327 ff_get_audio_frame_size: try to fix wma in wav
Fixes Ticket1905, Ticket2114

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2713e43ac85245805db95048493dde121a20aee7)
2013-01-07 01:05:34 +01:00
Piotr Bandurski
d338632e9f tiffdec: Use the correct height field.
Fixes Ticket913

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4784a135b2b0fe4d1b4c6256bd37265fc45aed3d)
2013-01-07 00:29:28 +01:00
Michael Niedermayer
bf19d4c6fa lavf: Fix codec id forcing with probed codecs
Fixes Ticket2088

(cherry picked from commit 341e40f1e1eeba1a2952c26363630596193e887b)
2013-01-02 02:38:11 +01:00
Michael Niedermayer
5502b073ec lavf: factor codec id forcing out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a7fbc7d7b7eabc74ceb1970a995c56043315e433)

Conflicts:
	libavformat/utils.c
2013-01-02 02:31:27 +01:00
Clément Bœsch
8bc0127b3d lavc/ass_split: check for NULL pointer in ff_ass_split_override_codes().
This is consistent with the other ff_ass_split_* functions.

It also fixes a crash when trying to split a dialog with text=NULL
(which seems to happen when the text of the dialog is empty); basically,
this commit fixes crashes when trying to encode an empty text subtitle
dialog (see subrip and mov_text encoders).

Fixes Ticket2048.
(cherry picked from commit c83002a4f8042ccfa0688a9a18e8fa0369c1fda8)
2013-01-01 18:19:50 +01:00
Michael Niedermayer
5f0e5b4048 mpeg1video: fix regression with slices != threads
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a01679586cd9ac8470b81c0299fc7e13fd980d64)
2012-12-13 00:21:18 +01:00
Michael Niedermayer
e9ded2e1a9 mpeg1video: support multi threaded slice encoding.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 03df9720168335482f00898fc16b56ff4878d0e7)

Conflicts:
	libavcodec/mpeg12enc.c
2012-12-13 00:21:09 +01:00
Michael Niedermayer
6d16f5c3f9 avidec: try to support oddly muxed MMES stream
Fixes ticket1804

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit be89693ddc5a8cdeaf3edf48fb584d6adca54de0)
2012-12-10 01:04:54 +01:00
Michael Niedermayer
28e609a84f riff: ignore ff_read_riff_info() failure.
Some files simply contain invalid info tags.
Fixes unrelated bug posted into Ticket1821

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 09456d0df13404f004ab3a341d9ac21b7e5e6d6d)
2012-12-10 00:46:22 +01:00
Michael Niedermayer
c6850d3862 riff: retry reading metadata without padding if it fails with
Fixes Ticket1821

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d0c27e88d2bb495d61bd32f41769f767a0c2a802)
2012-12-10 00:46:15 +01:00
Janne Grunau
69cc119d64 h264: slice-mt: get last_pic_dropable from master context
Fixes fate-h264-conformance-cvnlfi2_sony_h and smllwebdl.mkv from
https://github.com/OpenELEC/OpenELEC.tv/issues/1557 .
(cherry picked from commit 24c62ea7a5df44804be88150aa0c45e6796b5da9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 16:44:49 +01:00
Michael Niedermayer
54ac3d10d1 mp3dec: Fix possibly exploitable crash
I was sadly unable to find a non fuzzed mp3 that uses the
feature that contained the bug (and i searched hard ...), thus
while this fixes the security issue. It may or may not fix
mixed blocks in 8khz mp3s, i cant say due to lack of samples to test.

Security issue exists since: b37d945dd4213cb8e92146571b0374cd45d52286

Reported-by: Dale Curtis <dalecurtis@google.com>
(Probably) Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 94041febc53a6da10e34c2bfff9ff1d580fdce60)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-12-06 16:28:27 +01:00
Nicolas George
d3835cb877 lavf: compute probe buffer size more reliably.
The previous code computes the offset by reversing the growth
of the allocated buffer size: it is complex and did lead to
inconsistencies when the size limit is reached.

Fix trac ticket #1991.
(cherry picked from commit 03847eb8259291b4ff1bd840bd779d0699d71f96)

Conflicts:
	libavformat/utils.c
(cherry picked from commit e74cd2f4706f71da5e9205003c1d8263b54ed3fb)
2012-12-05 01:36:56 +01:00
Michael Niedermayer
b06903e6c5 Changelog for 0.11.2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n0.11.2
2012-09-19 03:11:27 +02:00
Michael Niedermayer
a5069caecd arm/intmath: disable av_clip_uintp2_arm with config_small
The code otherwise breaks compilation (gcc 4.5 tested but probably any compiler)

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:52:42 +02:00
Michael Niedermayer
b5e72345a6 Update for 0.11.2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:27:17 +02:00
Paul B Mahol
99dbda3008 aasc: fix out of array write
Closes #1619.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit 8a57ca5c6a1c0ad28afa7ea6f824981e6761cce1)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:21:58 +02:00
Michael Niedermayer
d721cb009d bmv_videodec: fix out of array read
Fixes Ticket1373

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:21:22 +02:00
Michael Niedermayer
55b3e408fa faxcompr: fix out of array read
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5891e454a667e42ef71a06bfd9661540ea3f3ebd)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:20:38 +02:00
Michael Niedermayer
9f1e01c991 escape124: fix integer overflow leading to excessive memory allocation
Fixes Ticket1629

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:18:39 +02:00
Michael Niedermayer
450e4b1a60 sp5xdec: fix off by 1 error causing a crash
Fixes Ticket1633

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-15 00:16:27 +02:00