Commit Graph

38476 Commits

Author SHA1 Message Date
Martin Storsjö
cc41167aed asfdec: Check the return value of asf_read_stream_properties
This makes sure errors in setting stream parameters are passed
on to the caller. This avoids successfully opening files while
some parameters aren't filled in properly.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-30 10:48:58 +03:00
Maxim Poliakovski
487b54104a omadec: fix bitrate for ATRAC3+ streams
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-29 21:54:51 +02:00
Maxim Poliakovski
23d0fdcf6f Add support for multichannel ATRAC3+ streams.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-29 21:52:57 +02:00
Anton Khirnov
93370d1216 mxfdec: set audio timebase to 1/samplerate
Fixes sync in some samples (e.g. bugs 7581 and 8374 in VLC).
Based on a commit by Matthieu Bouron <matthieu.bouron@gmail.com>

Reported-by: Jean-Baptiste Kempf <jb@videolan.org>
CC: libav-stable@libav.org
2013-09-29 21:50:30 +02:00
Martin Storsjö
ff07ec143e pcx: Return an error on broken palette if err_detect is set to 'explode'
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 21:05:16 +03:00
Martin Storsjö
d1d99e3bef pcx: Check the packet size before assuming it fits a palette
This fixes reads out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:03:12 +03:00
Martin Storsjö
7ba0cedbfe rpza: Fix a buffer size check
We read 2 bytes for 15 out of 16 pixels, therefore we need to
have at least 30 bytes, not 16.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:42 +03:00
Martin Storsjö
aa0dd52434 xxan: Disallow odd width
Decoded data is always written in pairs within this decoder.
This fixes writes out of bounds.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:32 +03:00
Martin Storsjö
fc739b3eef xan: Only read within the data that actually was initialized
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:02:19 +03:00
Martin Storsjö
30db94dc39 xan: Use bytestream2 to limit reading to within the buffer
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:50 +03:00
Martin Storsjö
9fb0de86b4 pcx: Consume the whole packet if giving up due to missing palette
Previously, we returned 0, meaning successful decoding but 0
bytes consumed, leading to an infinite loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:29 +03:00
Martin Storsjö
a81cad8f86 pngdec: Stop trying to decode once inflate returns Z_STREAM_END
If the input buffer contains more data after the deflate stream,
the loop previously left running infinitely, with inflate returning
Z_STREAM_END.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:01:03 +03:00
Martin Storsjö
c231987662 mov: Make sure the read sample count is nonnegative
This avoids setting a negative number of frames, ending up with a
negative average frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:00:45 +03:00
Martin Storsjö
640a2427aa bfi: Add some very basic sanity checks for input packet sizes
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:59:32 +03:00
Martin Storsjö
9fc7184d1a bfi: Avoid divisions by zero
If a zero-length video packet is to be returned, just return
AVERROR(EAGAIN) and switch back to the audio stream.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:58:56 +03:00
Martin Storsjö
a9221e3960 electronicarts: Add more sanity checking for the number of channels
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:58:41 +03:00
Martin Storsjö
d07aa3f02b riffdec: Add sanity checks for the sample rate
This avoids a division by zero for G726.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:58:18 +03:00
Martin Storsjö
28ff439efd mvi: Add sanity checking for the audio frame size
This avoids a division by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:57:43 +03:00
Martin Storsjö
59480abce7 alac: Do bounds checking of lpc_order read from the bitstream
In lpc_prediction(), we write up to array element 'lpc_order' in
an array allocated to hold 'max_samples_per_frame' elements.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:57:10 +03:00
Martin Storsjö
adc09136a4 xwma: Avoid division by zero
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:56:44 +03:00
Martin Storsjö
8d07258bb6 avidec: Make sure a packet is large enough before reading its data
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 19:56:22 +03:00
Martin Storsjö
68ff998128 vqf: Make sure the bitrate is in the valid range
Even if the sample rate is valid, an invalid bitrate could
pass the mode combination test below.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 18:46:39 +03:00
Martin Storsjö
9277050e29 vqf: Make sure sample_rate is set to a valid value
This avoids divisions by zero later (and possibly assertions in
time base scaling), since an invalid rate_flag combined with an
invalid bitrate below could pass the mode combination test.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 18:46:21 +03:00
Anton Khirnov
0767bfd199 lavfi: allow user-provided execute() callbacks 2013-09-28 08:06:19 +02:00
Anton Khirnov
38e15df148 avframe: note that linesize is not the usable data size 2013-09-28 07:35:50 +02:00
Luca Barbato
5c349ad08a lxf: check the nb_streams instead of relying on padding
Remove the now unneeded stream pointer while at it.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-27 01:33:46 +02:00
Paul B Mahol
a529fa2f4d lxf: remove deplanarization hack
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-09-27 01:33:46 +02:00
Paul B Mahol
7e52080cb1 pcm: support 24-bit/32-bit little-endian planar
Used by LXF.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Carl Eugen Hoyos
839df90c71 lxf: Support 16-channel files
Reported, analyzed and tested by Gabriel Gerard.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Reimar Döffinger
779951cd2c lxf: Support version 1 files
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-09-27 01:33:45 +02:00
Martin Storsjö
d872fb0f7f lavf: Reset the entry count and allocation size variables on av_reallocp failures
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.

Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:14:03 +03:00
Martin Storsjö
06ebc0bf9a lavf: Allocate arrays with av_realloc if they will be realloced later
Pointers returned from av_malloc can't in general be passed
to av_realloc.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:53 +03:00
Martin Storsjö
1af78b865b rtpdec_qt: Add an accidentally removed allocation return value check
This check was mistakenly removed in 5626f994f.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:50 +03:00
Martin Storsjö
705b748e8d tls: Add support for listen mode
Also add options for specifying a certificate and key, which can
be used both when operating as client and as server.

Partially based on a patch by Peter Ross.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:35 +03:00
Martin Storsjö
5c53bf7aaf http: Pass options through to the nested protocol
When passing a dict to the nested protocol, it will consume
the used options from it, so a separate copy needs to be used
when reopening the connection multiple times.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:16 +03:00
Martin Storsjö
8b09d917e7 tls: Add options for verifying the peer certificate
A file containing the trusted CA certificates needs to be
supplied via the ca_file AVOption, unless the TLS library
has got a system default file/database set up.

This doesn't check the hostname of the peer certificate with
openssl, which requires a non-trivial piece of code for
manually matching the desired hostname to the string provided
by the certificate, not provided as a library function.

That is, with openssl, this only validates that the received
certificate is signed with the right CA, but not that it is
the actual server we think we're talking to.

Verification is still disabled by default since we can't count
on a proper CA database existing at all times.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:13:06 +03:00
Kostya Shishkov
4370f65be8 g2meet: Respect cursor_stride properly everywhere
This fixes a regression with rgb cursors since b1e46988.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-25 17:42:01 +03:00
Anton Khirnov
5f4b1b1cbd lavc doxy: document that avcodec_flush_buffers() invalidates decoded frames 2013-09-24 17:34:00 +02:00
Anton Khirnov
2725f2d403 doc/filters: fix an option name in the unsharp docs 2013-09-24 17:22:11 +02:00
Anton Khirnov
cab8c5f8e1 h264: do not reinitialize the global cabac tables at each slice header 2013-09-24 17:13:52 +02:00
Anton Khirnov
e880418660 cabac: remove write-only h264_mps_state[] 2013-09-24 17:13:17 +02:00
Anton Khirnov
668643b923 matroskadec: check av_strdup() when setting defaults 2013-09-24 17:11:50 +02:00
Kieran Kunhya
58894ab3f9 lavc: add support for interleaved chroma formats to libx264.
Interleaved chroma is x264's native format

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-24 14:15:04 +02:00
Michael Niedermayer
a454dec19a pixdesc: fix NV20* descriptors
They were inconsistent (overlapping fields and wrong sizes)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-24 14:02:10 +02:00
Michael Niedermayer
84df6d6a85 h264_sei: check SEI size
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-24 13:24:29 +02:00
Rainer Hochecker
71cabb521a h264: do not discard NAL_SEI when skipping frames
Setting AVDISCARD_NONREF (e.g. after flushing) resulted in 100% dropped frames.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-24 13:24:29 +02:00
Vittorio Giovara
edaba18021 h264: log extradata skip only for non-ignored NALs
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-24 13:24:28 +02:00
Vittorio Giovara
26179964ff h264_sei: log unknown sei messages
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-09-24 13:24:28 +02:00
Martin Storsjö
5f24fe82e5 mpegvideo: Initialize chroma_*_shift and codec_tag even if the size is 0
This fixes breakage in a few fate tests on certain setups
(that for some reason didn't break on OS X) after the previous
commit (8812a8057). Currently, some video streams are initialized
in ff_MPV_common_init with width/height set at 0 and only changed
to a proper video size with ff_MPV_common_frame_size_change later.

The breakage was diagnosed by Anton Khirnov.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-24 14:02:23 +03:00
Alex Smith
d6d27f3e58 configure: Enable -Qansi-alias for icl 14+
Qansi-alias worked on 12.x, then caused miscompilation on 13.x, but now
works again passing all FATE tests for icl version 14.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-24 11:29:00 +02:00