platform/upstream/libav.git
10 years agolxf: Support 16-channel files
Carl Eugen Hoyos [Thu, 16 Aug 2012 08:20:25 +0000 (10:20 +0200)]
lxf: Support 16-channel files

Reported, analyzed and tested by Gabriel Gerard.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agolxf: Support version 1 files
Reimar Döffinger [Sat, 24 Mar 2012 15:47:33 +0000 (16:47 +0100)]
lxf: Support version 1 files

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agolavf: Reset the entry count and allocation size variables on av_reallocp failures
Martin Storsjö [Thu, 26 Sep 2013 13:37:02 +0000 (16:37 +0300)]
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>
10 years agolavf: Allocate arrays with av_realloc if they will be realloced later
Martin Storsjö [Thu, 26 Sep 2013 13:34:04 +0000 (16:34 +0300)]
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>
10 years agortpdec_qt: Add an accidentally removed allocation return value check
Martin Storsjö [Thu, 26 Sep 2013 13:34:59 +0000 (16:34 +0300)]
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>
10 years agotls: Add support for listen mode
Martin Storsjö [Thu, 19 Sep 2013 09:30:52 +0000 (12:30 +0300)]
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>
10 years agohttp: Pass options through to the nested protocol
Martin Storsjö [Mon, 7 Nov 2011 09:06:50 +0000 (11:06 +0200)]
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>
10 years agotls: Add options for verifying the peer certificate
Martin Storsjö [Tue, 22 Feb 2011 10:02:01 +0000 (12:02 +0200)]
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>
10 years agog2meet: Respect cursor_stride properly everywhere
Kostya Shishkov [Wed, 25 Sep 2013 09:09:33 +0000 (12:09 +0300)]
g2meet: Respect cursor_stride properly everywhere

This fixes a regression with rgb cursors since b1e46988.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agolavc doxy: document that avcodec_flush_buffers() invalidates decoded frames
Anton Khirnov [Tue, 18 Jun 2013 09:35:44 +0000 (11:35 +0200)]
lavc doxy: document that avcodec_flush_buffers() invalidates decoded frames

10 years agodoc/filters: fix an option name in the unsharp docs
Anton Khirnov [Thu, 11 Jul 2013 02:44:41 +0000 (04:44 +0200)]
doc/filters: fix an option name in the unsharp docs

10 years agoh264: do not reinitialize the global cabac tables at each slice header
Anton Khirnov [Sun, 11 Aug 2013 10:14:44 +0000 (12:14 +0200)]
h264: do not reinitialize the global cabac tables at each slice header

10 years agocabac: remove write-only h264_mps_state[]
Anton Khirnov [Sun, 11 Aug 2013 10:12:43 +0000 (12:12 +0200)]
cabac: remove write-only h264_mps_state[]

10 years agomatroskadec: check av_strdup() when setting defaults
Anton Khirnov [Wed, 4 Sep 2013 06:55:17 +0000 (08:55 +0200)]
matroskadec: check av_strdup() when setting defaults

10 years agolavc: add support for interleaved chroma formats to libx264.
Kieran Kunhya [Sun, 22 Sep 2013 15:54:47 +0000 (10:54 -0500)]
lavc: add support for interleaved chroma formats to libx264.

Interleaved chroma is x264's native format

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agopixdesc: fix NV20* descriptors
Michael Niedermayer [Sun, 22 Sep 2013 10:42:18 +0000 (05:42 -0500)]
pixdesc: fix NV20* descriptors

They were inconsistent (overlapping fields and wrong sizes)

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoh264_sei: check SEI size
Michael Niedermayer [Thu, 19 Sep 2013 14:26:25 +0000 (16:26 +0200)]
h264_sei: check SEI size

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoh264: do not discard NAL_SEI when skipping frames
Rainer Hochecker [Thu, 19 Sep 2013 14:26:24 +0000 (16:26 +0200)]
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>
10 years agoh264: log extradata skip only for non-ignored NALs
Vittorio Giovara [Fri, 20 Sep 2013 13:42:41 +0000 (15:42 +0200)]
h264: log extradata skip only for non-ignored NALs

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoh264_sei: log unknown sei messages
Vittorio Giovara [Thu, 19 Sep 2013 15:28:41 +0000 (17:28 +0200)]
h264_sei: log unknown sei messages

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agompegvideo: Initialize chroma_*_shift and codec_tag even if the size is 0
Martin Storsjö [Tue, 24 Sep 2013 09:02:39 +0000 (12:02 +0300)]
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>
10 years agoconfigure: Enable -Qansi-alias for icl 14+
Alex Smith [Tue, 24 Sep 2013 08:30:38 +0000 (04:30 -0400)]
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>
10 years agoh263dec: Remove a hack that can cause infinite loops
Martin Storsjö [Mon, 23 Sep 2013 09:25:48 +0000 (12:25 +0300)]
h263dec: Remove a hack that can cause infinite loops

The actual usefulness of the hack is not known, and it does cause
infinite loops with some broken input files.

CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenchint: Clear size and len if the realloc failed
Martin Storsjö [Sun, 22 Sep 2013 15:31:54 +0000 (18:31 +0300)]
movenchint: Clear size and len if the realloc failed

Previously these were left in an inconsistent state.

Pointed out by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Return a proper error code for invalid combinations
Martin Storsjö [Sun, 22 Sep 2013 11:44:17 +0000 (14:44 +0300)]
movenc: Return a proper error code for invalid combinations

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovc1dec: Check the error handling flags on slice/field header decode errors
Martin Storsjö [Sun, 22 Sep 2013 11:50:48 +0000 (14:50 +0300)]
vc1dec: Check the error handling flags on slice/field header decode errors

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoelectronicarts: Check packet sizes before reading
Martin Storsjö [Fri, 20 Sep 2013 09:26:45 +0000 (12:26 +0300)]
electronicarts: Check packet sizes before reading

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agolavf: Avoid setting avg_frame_rate if delta_dts is negative
Martin Storsjö [Fri, 20 Sep 2013 09:20:06 +0000 (12:20 +0300)]
lavf: Avoid setting avg_frame_rate if delta_dts is negative

This avoids setting avg_frame_rate to invalid (negative)
values.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovc1dec: Don't decode slices when the latest slice header failed to decode
Michael Niedermayer [Tue, 19 Feb 2013 20:40:09 +0000 (21:40 +0100)]
vc1dec: Don't decode slices when the latest slice header failed to decode

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks
Martin Storsjö [Fri, 20 Sep 2013 08:32:25 +0000 (11:32 +0300)]
vc1dec: Make sure last_picture is initialized in vc1_decode_skip_blocks

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovc1dec: Undo mpegvideo initialization if unable to allocate tables
Martin Storsjö [Fri, 20 Sep 2013 08:16:57 +0000 (11:16 +0300)]
vc1dec: Undo mpegvideo initialization if unable to allocate tables

Previously, s->context_initialized was left set to 1
if ff_vc1_decode_init_alloc_tables failed, skipping the
initialization completely on the next decode call.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovc1dec: Fix leaks in ff_vc1_decode_init_alloc_tables on errors
Martin Storsjö [Fri, 20 Sep 2013 08:16:00 +0000 (11:16 +0300)]
vc1dec: Fix leaks in ff_vc1_decode_init_alloc_tables on errors

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agownv1: Make sure the input packet is large enough
Martin Storsjö [Thu, 19 Sep 2013 21:07:34 +0000 (00:07 +0300)]
wnv1: Make sure the input packet is large enough

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Use keyframes as default fragmentation point in ismv
Martin Storsjö [Tue, 10 Sep 2013 15:43:19 +0000 (18:43 +0300)]
movenc: Use keyframes as default fragmentation point in ismv

Fragmenting blindly to a certain duration isn't a good choice
if one should be able to switch between different qualities,
therefore default to keyframes instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Set all implicit flags immediately in mov_write_header
Martin Storsjö [Tue, 10 Sep 2013 12:56:19 +0000 (15:56 +0300)]
movenc: Set all implicit flags immediately in mov_write_header

This makes sure other sanity checks for conflicting options
can work properly, e.g. for the conflict between the faststart
flag when using the ismv mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Set mov->mode earlier in mov_write_header
Martin Storsjö [Sat, 21 Sep 2013 22:29:33 +0000 (01:29 +0300)]
movenc: Set mov->mode earlier in mov_write_header

This allows simplifying some early checks that depend on the
muxer mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agotls: Do not abort on non-fatal TLS alerts with gnutls
Martin Storsjö [Sat, 21 Sep 2013 22:02:36 +0000 (01:02 +0300)]
tls: Do not abort on non-fatal TLS alerts with gnutls

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoflv: Make onTextData parsing robust
Luca Barbato [Fri, 20 Sep 2013 21:14:41 +0000 (23:14 +0200)]
flv: Make onTextData parsing robust

Certain streaming servers do not preserve the order of the fields.

10 years agortmp: Replace a magic number with a macro
Luca Barbato [Sat, 21 Sep 2013 19:16:04 +0000 (21:16 +0200)]
rtmp: Replace a magic number with a macro

11 is the RTMP header size.

10 years agortmp: Rewrite embedded flv handling
Luca Barbato [Sat, 21 Sep 2013 09:10:41 +0000 (11:10 +0200)]
rtmp: Rewrite embedded flv handling

Use update_offset() as done for rtmp audio, video and notifications and
read update and write the fields instead of replacing them in the rtmp
packet and then memcpying it to the output buffer.

10 years agortmp: Refactor get_packet
Luca Barbato [Sat, 21 Sep 2013 09:09:39 +0000 (11:09 +0200)]
rtmp: Refactor get_packet

10 years agortmp: Support AMF_DATA_TYPE_MIXEDARRAY
Luca Barbato [Sat, 21 Sep 2013 08:04:54 +0000 (10:04 +0200)]
rtmp: Support AMF_DATA_TYPE_MIXEDARRAY

And fix the AMF_DATA_TYPE_ARRAY parsing while at it.

A MIXEDARRAY type, as the ARRAY, store the number of elements in
an uint32 before the list. The ARRAY is strict and does not have
an OBJECT terminator, MIXEDARRAY behaves like an OBJECT type and
a different than stated number of element can be present.

10 years agoavutil: Fix compilation with inline asm disabled on mingw
Alex Smith [Sat, 21 Sep 2013 11:22:12 +0000 (07:22 -0400)]
avutil: Fix compilation with inline asm disabled on mingw

Because of -Werror=implicit-function-declaration the build will fail.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agolavu: Add interleaved 4:2:2 8/10-bit formats
Kieran Kunhya [Tue, 17 Sep 2013 21:30:48 +0000 (16:30 -0500)]
lavu: Add interleaved 4:2:2 8/10-bit formats

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agoh264dec: Add .avc file name extension
Vittorio Giovara [Fri, 20 Sep 2013 15:07:18 +0000 (17:07 +0200)]
h264dec: Add .avc file name extension

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agoh264dec: K&R formatting cosmetics
Vittorio Giovara [Fri, 20 Sep 2013 15:28:04 +0000 (17:28 +0200)]
h264dec: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agomem: Handle av_reallocp(..., 0) properly
Martin Storsjö [Fri, 20 Sep 2013 11:02:41 +0000 (14:02 +0300)]
mem: Handle av_reallocp(..., 0) properly

Previously this did a double free (and returned an error).

Reported-by: Justin Ruggles
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoh264: remove an unused static constant
Vittorio Giovara [Fri, 20 Sep 2013 11:09:23 +0000 (13:09 +0200)]
h264: remove an unused static constant

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomsvc/icl: Use __declspec(noinline)
Alex Smith [Thu, 19 Sep 2013 21:33:23 +0000 (17:33 -0400)]
msvc/icl: Use __declspec(noinline)

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomsvc/icl: Use __declspec(deprecated)
Alex Smith [Thu, 19 Sep 2013 20:58:21 +0000 (16:58 -0400)]
msvc/icl: Use __declspec(deprecated)

Prior to this on msvc/icl there was no handling of deprecated functions
and the deprecated warning was disabled.

After enabling there are a number of warnings relating to the CRT and
the use of the non-secure versions of several functions.  Defining
_CRT_SECURE_NO_WARNINGS silences these warnings.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmp: Unbreak get_packet
Luca Barbato [Fri, 20 Sep 2013 09:55:20 +0000 (11:55 +0200)]
rtmp: Unbreak get_packet

Commit 5626f994f273af80fb100d4743b963304de9e05c broke it.

10 years agodcadec: Validate the lfe parameter
Martin Storsjö [Thu, 19 Sep 2013 12:12:06 +0000 (15:12 +0300)]
dcadec: Validate the lfe parameter

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmpproto: Add a comment explaining the logic in handle_notify
Martin Storsjö [Thu, 19 Sep 2013 09:48:04 +0000 (12:48 +0300)]
rtmpproto: Add a comment explaining the logic in handle_notify

This explains why the cleanup in 5626f994f was wrong and why
ae0f316a was needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agobuild: Support cparser
Luca Barbato [Thu, 12 Sep 2013 18:17:15 +0000 (20:17 +0200)]
build: Support cparser

10 years agor3d: Add more input value validation
Martin Storsjö [Thu, 19 Sep 2013 14:02:36 +0000 (17:02 +0300)]
r3d: Add more input value validation

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agorl2: Avoid a division by zero
Martin Storsjö [Thu, 19 Sep 2013 13:57:47 +0000 (16:57 +0300)]
rl2: Avoid 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>
10 years agowtv: Add more sanity checks for a length read from the file
Martin Storsjö [Thu, 19 Sep 2013 13:55:13 +0000 (16:55 +0300)]
wtv: Add more sanity checks for a length read from the file

Also make sure the existing length check can't overflow.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoyop: Clear all references to the AVBuffer in the local AVPacket
Martin Storsjö [Thu, 19 Sep 2013 13:49:48 +0000 (16:49 +0300)]
yop: Clear all references to the AVBuffer in the local AVPacket

This makes sure that it doesn't try to free an AVBuffer belonging
to an earlier packet when we free the local packet at the end.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agofraps: Make the input buffer size checks more strict
Martin Storsjö [Thu, 19 Sep 2013 13:29:23 +0000 (16:29 +0300)]
fraps: Make the input buffer size checks more strict

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosegafilm: Validate the number of audio channels
Martin Storsjö [Thu, 19 Sep 2013 13:02:29 +0000 (16:02 +0300)]
segafilm: Validate the number of audio channels

This avoids divisions by zero later.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosvq3: Avoid a division by zero
Martin Storsjö [Thu, 19 Sep 2013 12:58:59 +0000 (15:58 +0300)]
svq3: Avoid a division by zero

If the height is zero, the decompression will probably end up
failing due to not fitting into the allocated buffer later
anyway, so this doesn't need any more elaborate check.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoqpeg: Add checks for running out of rows in qpeg_decode_inter
Martin Storsjö [Thu, 19 Sep 2013 12:53:31 +0000 (15:53 +0300)]
qpeg: Add checks for running out of rows in qpeg_decode_inter

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agompegaudiodec: Validate that the number of channels fits at the given offset
Martin Storsjö [Thu, 19 Sep 2013 12:32:02 +0000 (15:32 +0300)]
mpegaudiodec: Validate that the number of channels fits at the given offset

This is similar to the fix in 35cbc98b.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoasvdec: Verify the amount of extradata
Martin Storsjö [Thu, 19 Sep 2013 12:14:56 +0000 (15:14 +0300)]
asvdec: Verify the amount of extradata

The init function reads one byte of extradata.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Use null buffers for measuring the amount of data to be written
Martin Storsjö [Wed, 18 Sep 2013 19:02:17 +0000 (22:02 +0300)]
movenc: Use null buffers for measuring the amount of data to be written

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoaviobuf: Add functions for null buffers
Martin Storsjö [Wed, 18 Sep 2013 18:50:50 +0000 (21:50 +0300)]
aviobuf: Add functions for null buffers

Null buffers are useful for simulating writing to a real buffer
for the sake of measuring how many bytes are written.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoasfenc: mux chapters in ASF files using an ASF "marker" section
Vladimir Pantelic [Thu, 19 Sep 2013 15:50:38 +0000 (17:50 +0200)]
asfenc: mux chapters in ASF files using an ASF "marker" section

ASF markers only have a start time, so we lose the chapter end times,
but that is ASF for you

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoasfenc: remember send time and offset of the index entries
Vladimir Pantelic [Thu, 19 Sep 2013 15:50:37 +0000 (17:50 +0200)]
asfenc: remember send time and offset of the index entries

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoasfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec
Vladimir Pantelic [Thu, 19 Sep 2013 15:50:36 +0000 (17:50 +0200)]
asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF spec

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoasfdec: replace magic constant with DATA_HEADER_SIZE
Vladimir Pantelic [Thu, 19 Sep 2013 15:50:35 +0000 (17:50 +0200)]
asfdec: replace magic constant with DATA_HEADER_SIZE

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agoasfdec: substract preroll time from marker presentation time
Vladimir Pantelic [Thu, 19 Sep 2013 15:50:34 +0000 (17:50 +0200)]
asfdec: substract preroll time from marker presentation time

this was forgotten when we changed ASF to not output the preroll time

Signed-off-by: Vladimir Pantelic <vladoman@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agorv34: Fix a memory leak on errors
Martin Storsjö [Mon, 16 Sep 2013 13:05:18 +0000 (16:05 +0300)]
rv34: Fix a memory leak on errors

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoidroqdec: Make sure a video stream has been allocated before returning packets
Martin Storsjö [Mon, 16 Sep 2013 11:53:15 +0000 (14:53 +0300)]
idroqdec: Make sure a video stream has been allocated before returning packets

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agorv10: Validate the dimensions set from the container
Martin Storsjö [Mon, 16 Sep 2013 12:40:57 +0000 (15:40 +0300)]
rv10: Validate the dimensions set from the container

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmp: Unbreak handle_notify
Luca Barbato [Wed, 18 Sep 2013 23:49:41 +0000 (01:49 +0200)]
rtmp: Unbreak handle_notify

Commit 5626f994f273af80fb100d4743b963304de9e05c broke it.

10 years agoaacdec: Add support for LD (Low Delay) AAC
Alex Converse [Mon, 16 Sep 2013 20:03:15 +0000 (13:03 -0700)]
aacdec: Add support for LD (Low Delay) AAC

10 years agoaacdec: Add support for Error Resilience syntax.
Alex Converse [Mon, 16 Sep 2013 06:32:23 +0000 (23:32 -0700)]
aacdec: Add support for Error Resilience syntax.

This does not add support for any error resilience tools.

10 years agoAdd a WebP decoder
Justin Ruggles [Tue, 16 Apr 2013 17:12:26 +0000 (22:42 +0530)]
Add a WebP decoder

Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org>
Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>

10 years agolavc: add ff_u8_to_s8() for safe type punning of uint8_t to int8_t
Justin Ruggles [Mon, 16 Sep 2013 14:11:32 +0000 (10:11 -0400)]
lavc: add ff_u8_to_s8() for safe type punning of uint8_t to int8_t

10 years agoavformat: Use av_reallocp() where suitable
Alexandra Khirnova [Wed, 18 Sep 2013 16:12:36 +0000 (18:12 +0200)]
avformat: Use av_reallocp() where suitable

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agormdec: Validate the fps value
Martin Storsjö [Mon, 16 Sep 2013 17:58:38 +0000 (20:58 +0300)]
rmdec: Validate the fps value

Abort if it is invalid if strict error checking has been requested.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Add an option for omitting the tfhd base offset
Martin Storsjö [Mon, 9 Sep 2013 12:04:57 +0000 (15:04 +0300)]
movenc: Add an option for omitting the tfhd base offset

This makes the output fragments independent of their position in
the output stream, making the output work better when streamed.

QuickTime Player doesn't support fragmented mp4 without the base
data offset, though.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Write the moof atom in two passes
Martin Storsjö [Mon, 9 Sep 2013 09:05:01 +0000 (12:05 +0300)]
movenc: Write the moof atom in two passes

This is a bit more work, but avoids having to fill in
the data offset field afterwards instead of directly when
the rest of the trun atom is written.

This simplifies future cases where this field needs to be set to
something different.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agotwinvqdec: Check the ibps parameter separately
Martin Storsjö [Tue, 17 Sep 2013 16:33:48 +0000 (19:33 +0300)]
twinvqdec: Check the ibps parameter separately

This is required, since invalid parameters actually could
pass the switch check below.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmp: Support reading interleaved chunks.
Josh Allmann [Tue, 17 Sep 2013 06:58:48 +0000 (23:58 -0700)]
rtmp: Support reading interleaved chunks.

A given packet won't always come in contiguously; sometimes
they may be broken up on chunk boundaries by packets of another
channel.

This support primarily involves tracking information about the
data that's been read, so the reader can pick up where it left
off for a given channel.

As a side effect, we no longer over-report the bytes read if
(toread = MIN(size, chunk_size)) == size

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoxmv: Add more sanity checks for parameters read from the bitstream
Martin Storsjö [Mon, 16 Sep 2013 18:27:49 +0000 (21:27 +0300)]
xmv: Add more sanity checks for parameters read from the bitstream

Since the number of channels is multiplied by 36 and assigned to
to a uint16_t, make sure this calculation didn't overflow. (In
certain cases the calculation could overflow leaving the
truncated block_align at 0, leading to divisions by zero later.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmpproto: Extend a comment to explain the prev_pkt arrays roles
Martin Storsjö [Tue, 17 Sep 2013 14:43:48 +0000 (17:43 +0300)]
rtmpproto: Extend a comment to explain the prev_pkt arrays roles

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmpproto: Consistently use the right prev_pkt array
Martin Storsjö [Tue, 17 Sep 2013 13:53:11 +0000 (16:53 +0300)]
rtmpproto: Consistently use the right prev_pkt array

prev_pkt[0] is used for input packets, while prev_pkt[1] is
used for output.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agortmpproto: Check for the right return code
Martin Storsjö [Tue, 17 Sep 2013 12:07:10 +0000 (15:07 +0300)]
rtmpproto: Check for the right return code

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agodca_parser: Handle changes in DCA frame size
John Stebbins [Wed, 4 Sep 2013 20:08:22 +0000 (13:08 -0700)]
dca_parser: Handle changes in DCA frame size

A change in framesize caused a perpetual loss of synchronization.
So read (and use) the frame size from the frame header instead of
setting it only once.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agojpeg2000dec: Add more checks when parsing headers
Martin Storsjö [Mon, 16 Sep 2013 13:17:05 +0000 (16:17 +0300)]
jpeg2000dec: Add more checks when parsing headers

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agodoc: Add missing hashes and dates to APIChanges
Luca Barbato [Tue, 17 Sep 2013 10:47:09 +0000 (12:47 +0200)]
doc: Add missing hashes and dates to APIChanges

Also fix the typo in the last entry version.

10 years agoffv1: Make sure at least one slice context is initialized
Martin Storsjö [Mon, 16 Sep 2013 18:46:50 +0000 (21:46 +0300)]
ffv1: Make sure at least one slice context is initialized

This avoids crashes when initializing the range coder for
the first slice context.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoeacmv: Make sure a reference frame exists before referencing it
Martin Storsjö [Mon, 16 Sep 2013 18:07:30 +0000 (21:07 +0300)]
eacmv: Make sure a reference frame exists before referencing it

This is similar to an existing check for the second-last frame
from 062421e3.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agotruemotion2: Use av_freep properly in an error path
Martin Storsjö [Mon, 16 Sep 2013 18:03:34 +0000 (21:03 +0300)]
truemotion2: Use av_freep properly in an error path

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agompeg4videodec: Check the width/height in mpeg4_decode_sprite_trajectory
Martin Storsjö [Mon, 16 Sep 2013 17:40:13 +0000 (20:40 +0300)]
mpeg4videodec: Check the width/height in mpeg4_decode_sprite_trajectory

This avoids a potential division by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoivi_common: Make sure color planes have been initialized
Martin Storsjö [Mon, 16 Sep 2013 17:32:35 +0000 (20:32 +0300)]
ivi_common: Make sure color planes have been initialized

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomov: Don't use a negative duration for setting other fields
Martin Storsjö [Mon, 16 Sep 2013 17:17:47 +0000 (20:17 +0300)]
mov: Don't use a negative duration for setting other fields

Some files have the duration set to -1 in the mdhd atom, more
or less legitimately. (We produce such files ourselves, for the
initial duration in fragmented mp4 files.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agooggparseogm: Convert to use bytestream2
Martin Storsjö [Mon, 16 Sep 2013 14:17:26 +0000 (17:17 +0300)]
oggparseogm: Convert to use bytestream2

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agorv34: Check the return value from ff_rv34_decode_init
Martin Storsjö [Mon, 16 Sep 2013 13:01:02 +0000 (16:01 +0300)]
rv34: Check the return value from ff_rv34_decode_init

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>