9031 Commits

Author SHA1 Message Date
Michael Niedermayer
68f1212696 Revert "rmdec: Avoid allocating huge packets"
This reverts commit 66f71f3b5e2e7b6e5049bd9831c371e16aff8a53.

This causes regressions with RDT.
(cherry picked from commit c4eec85a1fa768025f88261995af08f1dba9685d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 01:06:13 +01:00
Michael Niedermayer
0a5bca957d lavf: use avg_frame_rate and packet number to exit find_stream_info
qatar does this too but clobbers the AVPacket.duration by approximate
values.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 01:06:12 +01:00
Michael Niedermayer
0f61521f69 lavf: revert commit bb99ae3ae924c942a634bec7711ec7ee11c38eb9
Author: Michael Niedermayer <michaelni@gmx.at>
	Date:   Thu Nov 3 22:38:10 2011 +0100

	    lavf: fix null pointer dereference in rdt

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

This is no longer needed and causes various problems with RTSP

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-05 01:06:11 +01:00
Chris Evans
49b8709870 mkv: Fix a bug where a pointer was cached to an array that might later move due to
a realloc()

BUG=100492
Review URL: http://codereview.chromium.org/8366004
Fixes: 1 of 2 for CVE-2011-3893

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 22:18:55 +01:00
Michael Niedermayer
9f9b6388a3 electronicarts: Pass error through ea_read_header().
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f37174bc1913d534913e8825f1609a637cc4b364)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 22:18:01 +01:00
Oana Stratulat
32b62c7d6a electronicarts: Fix division by zero. Fixes Ticket #793
Signed-off-by: Oana Stratulat <oanaandreeastratulat@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0d3a51e5d279dd2a56c81ba7a81a70128c5a7545)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-04 22:18:01 +01:00
Paul B Mahol
e5ae872309 y41p encoder and decoder
y41p is a packed 12-bit 4:1:1 YUV format used by Brooktree.

Fixes issue 1123 / ticket #102.

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

Conflicts:

	Changelog
	libavcodec/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:50:03 +01:00
Michael Niedermayer
f6e360770d mpegpsenc: Fix integer overflow of the muxrate calculation.
this should fix the failure of h264-bsf-mp4toannexb on freebsd/openbsd

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:47:01 +01:00
Michael Niedermayer
4ae111cf71 lavf: ffio_limit(), treat avio_size()==0 as error.
This works around issues arising from inputs that claim to have a
filesize of 0.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:44:34 +01:00
Michael Niedermayer
0bf48d24d7 flvdec: Check avpriv_mpeg4audio_get_config() return
value before using its output.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:43:43 +01:00
Jean First
2dcacbb68e cache: use av_freep instead of av_free in cache_open
Signed-off-by: Jean First <jeanfirst@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 576ada791a5085b7427c9062ba4f65e811914bd0)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:43:26 +01:00
Michael Niedermayer
fa97a8030f flvdec: Check index for being valid
Fixes seeking in Enigma_Principles_of_Lust.flv

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:41:40 +01:00
Michael Niedermayer
53c430415a nsvdec: Check av_malloc(string_size)
This can easily be NULL as string_size can be 2g in a damaged file.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:41:16 +01:00
Michael Niedermayer
e1152971a6 issdemux: Check packet_size for validity
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bf5cc805190b5811b786a454f01cccf9a7e366b9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:40:24 +01:00
Michael Niedermayer
a80205ff82 segafilm: fail earlier in case theres not enough bytestream left for a
audio packet.
This prevents a potentially large memory allocation.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:32:39 +01:00
Michael Niedermayer
0231a68ecd avio: Fix ffio_limit() when due to seeking past the end less than 0 bytes remain.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 27d323577c19af218f8a5ac33364f213b623a023)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:32:28 +01:00
Michael Niedermayer
42476635ba asfdec: fix endless loop on EOF
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0d4404ed65e6ebfdf5e3c09f9e3a2a41dde18e4a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:32:04 +01:00
Michael Niedermayer
462ecdb9bb sierravmd: limit packetsize to the amount that could be read.
Fixes huge allocations.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:31:57 +01:00
Michael Niedermayer
a1666ae8f0 rmdec: Avoid allocating huge packets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 66f71f3b5e2e7b6e5049bd9831c371e16aff8a53)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:31:35 +01:00
Michael Niedermayer
adf0c1c70c rpl: Fix near infinite loop in index reading due to missing eof check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 43abef9fde0cf87153cc9031cad61f75b02cfa01)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:31:16 +01:00
Michael Niedermayer
a9de82ac17 avio: fix handling of , in urls
Fixes Ticket805

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:29:21 +01:00
Michael Niedermayer
33636442e2 udp: support non blocking reads with fifo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9f50dafe9025555f11e66e3b09cf3db2cd53cfb2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:26:26 +01:00
Michael Niedermayer
3710f0b9ed udp: Replace double select() by select+mutex+cond.
When no data was available both the buffer thread as well as
the main thread would block in select(), when data becomes
available both should move forward and as data is read in the
buffer thread the main thread would block in select() later
the read data was put in the fifo but the main thread still
would be blocked in select() until either the timeout or
another packet would come in.

This is solved in this commit by using a mutex and a condition
variable

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:26:20 +01:00
Michael Niedermayer
12d0e44bdb udp: return circular buffer error if such error happened.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3dcbafc777513621e423c2f23b1725559230383d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 22:26:06 +01:00
Paul B Mahol
8dce2dd9cc lavf: Add SMJPEG demuxer.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a4209ad6313b8b40fed2bfc7e3865cf54d4c1022)

Conflicts:

	Changelog
	doc/general.texi
	libavformat/version.h

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 21:51:53 +01:00
Michael Niedermayer
532731369a ipmovie: fix FPE
Fixed Ticket807
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 21:51:53 +01:00
Tomas Härdin
5c2097cff7 mxfdec: Sanity check PreviousPartition
Without this certain files could get the demuxer stuck in a loop
(cherry picked from commit 46d65fb8a574465499a470d0c34a30902e45176a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 20:52:21 +01:00
Tomas Härdin
6a8826abf4 mxfdec: Move the current_partition check inside mxf_read_header()
This fixes SIGSEGV on files where this is actually the case, such as zzuf4.mxf
(cherry picked from commit 184f479096dabcb1eafd9c661304f410a76780ed)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 20:51:52 +01:00
Tomas Härdin
46e4dd66da mxfdec: Check url_feof() in mxf_read_local_tags()
This fixes the infinite loop with zzuf2.mxf
(cherry picked from commit 2116e4ba917748c0985be2347d400ba0f3fe6c64)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 20:50:30 +01:00
Tomas Härdin
7e35c3e177 mxfdec: Check for NULL component
This fixes SIGSEGV with zzuf1.mxf
(cherry picked from commit 5e5e69d0787ae4939f3f8e8d6c0342310eda28ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 20:50:20 +01:00
Michael Niedermayer
fd552756d9 avio: remove ENOTSUP mention in doxy as its not available on all supported platforms
and thus cannot be used

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 20:49:24 +01:00
Luca Barbato
cb75ed3014 nut: support 10bit YUV
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 432f0e5b7d2329976ef7aee05d990c7462efd0ee)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 20:00:05 +01:00
Alex Converse
7a8fc9906f mpegts: Suppress invalid timebase warnings on DMB streams.
timestamp_len and timestamp_res intialize to zero.
(cherry picked from commit 41bdd4adc4ab90a5ef7d63050a4046fcba711365)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:58:16 +01:00
Alex Converse
c2507fb986 mpegts: Fix typo in handling sections in the PMT.
This was an error rebasing 4682a1dc3aa2554ad7077f5db32d0f2d598d018e for
commit. The "pes" variable guaranteed to be NULL in that block.
(cherry picked from commit d9b89b23df4f63d67694507f3d1caee62424a9d8)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:56:57 +01:00
Michael Niedermayer
1db39228c6 roq: fix excessive memory alloc
Fixes Ticket802
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:56:16 +01:00
Michael Niedermayer
d561025e49 avidec: move eof check before continue.
Fixes a infinite loop
Fixes half of Ticket800
Bug found by Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:55:54 +01:00
Michael Niedermayer
a1a079dce4 siff: simplify code by using ffio_limit()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b08a742526d05bcf300af820da5c79d2a05f9959)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:49:56 +01:00
Michael Niedermayer
c0c5189e66 soxdec: check av_malloc return.
Bug found by: durandal_1707

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:49:56 +01:00
Michael Niedermayer
0ab9072ee0 dsicin demuxer: Fix excessive malloc()
use ffio_limit()
Fixes Ticket 790
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:49:56 +01:00
Michael Niedermayer
3461d27506 lavf: split out ffio_limit()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e39eeb10d1b36b5681e42a7539d5b168fa292d61)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:49:56 +01:00
Michael Niedermayer
0815a2907a rl2demux: Fix FPE
Fixes Ticket788
Bug found by Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:49:55 +01:00
Michael Niedermayer
21ca96049f siff: Fix excessive memory allocation.
Bug found by: Oana Stratulat

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:49:55 +01:00
Michael Niedermayer
9f1dde03d5 mov: detect EOF in mov_read_dref()
This fixes a (near) infinite loop and Ticket783
Bug found by: cosminamironesei

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:49:55 +01:00
Michael Niedermayer
cb2d66a470 avienc: Fix rawvideo 32bit
Bug found by: Rik Maes <rik.maes54@gmail.com>
Change based on suggestion by Rik Maes

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:04:56 +01:00
Michael Niedermayer
c55b158b87 mtvdemuxer: fix segfault caused by truncated packets.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f890cb948c932e3b01f9a616ff1600769c539853)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:02:00 +01:00
Michael Niedermayer
5ca4ec76b7 lavf: print an error if a packet has been truncated due to filesize
in av_get_packet()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:01:49 +01:00
Michael Niedermayer
813c05fcd2 txd/westwood: remove demuxer specific overallocate solutions as the new generic code
handles it fine.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:01:40 +01:00
Michael Niedermayer
dd5d2de5ec lavf: Update AVIOContext.maxsize when hitting the end.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 559ae20dda9e84abf878ee10f8dcea78dacfd0cc)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 19:01:30 +01:00
Michael Niedermayer
c40296d1ad avidec: Check that the header chunks fit in the available filesize.
Fixes Ticket771
Bug found by: Diana Elena Muscalu

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 18:29:02 +01:00
Michael Niedermayer
cd5d5bf45c txddemux: Limit allocated packets to filesize.
Fixes Ticket772
Bug found by: Diana Elena Muscalu

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-01-03 18:28:54 +01:00