platform/upstream/libav.git
11 years agolibfdk-aac: Warn the user that the VBR modes are unsupported
Martin Storsjö [Tue, 25 Sep 2012 05:31:44 +0000 (08:31 +0300)]
libfdk-aac: Warn the user that the VBR modes are unsupported

These modes were not originally exposed by the library at all.
In practice, only a few of them work for each sample rate/profile
combination, and they don't work at all for the more uncommon
sample rates.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoRevert "cbrt_tablegen: Include libm.h"
Derek Buitenhuis [Tue, 25 Sep 2012 16:54:26 +0000 (12:54 -0400)]
Revert "cbrt_tablegen: Include libm.h"

This code runs on the host and should not use libm.h, which is meant
for the target.

This reverts commit 2768b717987d4e19d2774890d7d84aef531b1d9f.

11 years agopthread: make sure AVFrame.extended_data is set properly.
Anton Khirnov [Tue, 25 Sep 2012 06:08:28 +0000 (08:08 +0200)]
pthread: make sure AVFrame.extended_data is set properly.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agolibfdk-aac: reindent after last commit
Nathan Caldwell [Mon, 24 Sep 2012 23:03:22 +0000 (17:03 -0600)]
libfdk-aac: reindent after last commit

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agolibfdk-aac: Limit to supported sample rates.
Nathan Caldwell [Mon, 24 Sep 2012 23:02:44 +0000 (17:02 -0600)]
libfdk-aac: Limit to supported sample rates.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agocbrt_tablegen: Include libm.h
Derek Buitenhuis [Mon, 24 Sep 2012 23:22:15 +0000 (23:22 +0000)]
cbrt_tablegen: Include libm.h

Needed for cbrtf fallback on systems which lack it.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agooggparsetheora: make it more robust
Luca Barbato [Wed, 19 Sep 2012 23:33:47 +0000 (01:33 +0200)]
oggparsetheora: make it more robust

11 years agoogg: prevent NULL pointer deference in theora gptopts
Michael Niedermayer [Fri, 23 Mar 2012 02:43:30 +0000 (03:43 +0100)]
ogg: prevent NULL pointer deference in theora gptopts

Additional safety in case a special ogg stream is crafted
with the proper number of

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years agoogg: calculate the start position once all the headers are parsed
Luca Barbato [Wed, 19 Sep 2012 23:07:09 +0000 (01:07 +0200)]
ogg: calculate the start position once all the headers are parsed

The fisbone packets can be muxed in any order as long the last one
comes before the first data packet.

11 years agoogg: check that the expected number of headers had been parsed
Luca Barbato [Wed, 19 Sep 2012 23:01:43 +0000 (01:01 +0200)]
ogg: check that the expected number of headers had been parsed

Not having the header for a codec is a tell-tale of a broken file.

11 years agolibx264: change default to closed gop to match x264cli
John Van Sickle [Sat, 22 Sep 2012 18:41:16 +0000 (14:41 -0400)]
libx264: change default to closed gop to match x264cli

open-gop can be enabled with "-flags -cgop"

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agoUse avcodec_free_frame() to free AVFrames.
Anton Khirnov [Fri, 21 Sep 2012 07:10:23 +0000 (09:10 +0200)]
Use avcodec_free_frame() to free AVFrames.

11 years agolavf: use a malloced AVFrame in try_decode_frame().
Anton Khirnov [Fri, 21 Sep 2012 07:09:01 +0000 (09:09 +0200)]
lavf: use a malloced AVFrame in try_decode_frame().

This allows using avcodec_free_frame() to free it properly.

11 years agolavc: add avcodec_free_frame().
Anton Khirnov [Fri, 21 Sep 2012 07:07:02 +0000 (09:07 +0200)]
lavc: add avcodec_free_frame().

Since an AVFrame now has malloced members (extended_data), it must have
a destructor.

11 years agolavc: ensure extended_data is set properly on decoding
Anton Khirnov [Fri, 21 Sep 2012 07:04:12 +0000 (09:04 +0200)]
lavc: ensure extended_data is set properly on decoding

11 years agolavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()
Anton Khirnov [Fri, 21 Sep 2012 06:30:42 +0000 (08:30 +0200)]
lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()

11 years agolavc: use av_mallocz to allocate AVFrames.
Anton Khirnov [Mon, 24 Sep 2012 05:17:13 +0000 (07:17 +0200)]
lavc: use av_mallocz to allocate AVFrames.

Otherwise the frame is uninitialized, so avcodec_get_frame_defaults()
cannot determine whether to free extended_data.

11 years agolavc: rename the argument of avcodec_alloc_frame/get_frame_defaults
Anton Khirnov [Fri, 21 Sep 2012 06:28:49 +0000 (08:28 +0200)]
lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults

AVFrame is used for both audio and video, so calling the argument 'pic'
is misleading.

11 years agortp: Packetization of JPEG (RFC 2435)
Samuel Pitoiset [Sun, 23 Sep 2012 14:17:41 +0000 (16:17 +0200)]
rtp: Packetization of JPEG (RFC 2435)

11 years agosmoothstreamingenc: Copy the SAR on the AVStreams as well
Martin Storsjö [Sat, 22 Sep 2012 21:18:23 +0000 (00:18 +0300)]
smoothstreamingenc: Copy the SAR on the AVStreams as well

This is required in chained muxers, if the SAR happens to be set.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agoavcodec: fix memleak in avcodec_encode_audio2()
Justin Ruggles [Thu, 23 Aug 2012 17:47:25 +0000 (13:47 -0400)]
avcodec: fix memleak in avcodec_encode_audio2()

Ensure that padded_frame is freed before returning when needed.

11 years agosipr: fall back to setting mode based on bit_rate.
Reimar Döffinger [Thu, 5 Jan 2012 20:01:56 +0000 (21:01 +0100)]
sipr: fall back to setting mode based on bit_rate.

Not all applications (e.g. MPlayer) set block_align, and
when using a different demuxer it might not even be
easily available.
So fall back to selecting mode based on bit rate as before
if block_align has not useful value.
It can't be worse than failing to decode completely.

(cherry picked from commit 1d0d63052b82c76e10c45cd38cdd27677de72e81)

CC: libav-stable@libav.org
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
11 years agolibx264: add forgotten ;
Anton Khirnov [Fri, 21 Sep 2012 07:20:09 +0000 (09:20 +0200)]
libx264: add forgotten ;

11 years agomatroskadec: fix a sanity check.
Anton Khirnov [Thu, 20 Sep 2012 18:04:56 +0000 (20:04 +0200)]
matroskadec: fix a sanity check.

11 years agomatroskadec: only return corrupt packets that actually contain data
Anton Khirnov [Thu, 20 Sep 2012 18:01:43 +0000 (20:01 +0200)]
matroskadec: only return corrupt packets that actually contain data

Fixes bug 372.

11 years agolavf: zero data/size of the packet passed to read_packet().
Anton Khirnov [Thu, 20 Sep 2012 18:00:39 +0000 (20:00 +0200)]
lavf: zero data/size of the packet passed to read_packet().

11 years agoARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code
Mans Rullgard [Thu, 20 Sep 2012 21:55:11 +0000 (22:55 +0100)]
ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code

The Apple assembler refuses to assemble the 3-operand form
in Thumb2 even though it is valid syntax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoARM: align PIC offset pools to 4 bytes
Mans Rullgard [Thu, 20 Sep 2012 21:53:41 +0000 (22:53 +0100)]
ARM: align PIC offset pools to 4 bytes

When building Thumb2 code, the end of a function, where the PIC
offsets are placed, need not be aligned.  Although the values
are only accessed with instructions allowing unaligned addresses,
keeping them aligned is preferable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoARM: swap source operands in some add instructions
Mans Rullgard [Thu, 2 Aug 2012 18:17:16 +0000 (19:17 +0100)]
ARM: swap source operands in some add instructions

This allows using a 16-bit opcode when generating Thumb2 code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoconfigure: update tms470 detection for latest version
Mans Rullgard [Sat, 15 Sep 2012 14:36:22 +0000 (15:36 +0100)]
configure: update tms470 detection for latest version

v5.0 of the TI ARM compiler changes the version string.
This updates the detection to check for both the old and
the new strings.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agolavf probe: prevent codec probe with no data at all seen
Janne Grunau [Fri, 7 Sep 2012 14:27:21 +0000 (16:27 +0200)]
lavf probe: prevent codec probe with no data at all seen

This occurs with fuzzed mpeg-ts files. set_codec_from_probe_data() is
called with a zeroed AVProbeData since no packet made through for
specific stream.

11 years agomotion_est: fix use of inline on extern functions
Mans Rullgard [Wed, 19 Sep 2012 21:30:06 +0000 (22:30 +0100)]
motion_est: fix use of inline on extern functions

Inline functions declared without extern do not provide an external
definition in standard C99.  This code only works because most
compilers do not implement the inline semantics correctly.  With a
stricter compiler, linking fails with unresolved references to these
functions.

Declaring the functions extern inline works correctly with some
compilers while some others still fail to create external definitions.

For maximum portability, create a static inline version with an
externally visible wrapper for ff_get_mb_score.  ff_epzs_motion_search
is so large that no sane compiler inlines it anyway, so there the
inline keyword can simply be dropped with no effect.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agomp3dec: read Xing frame TOC index
Anton Khirnov [Sun, 2 Sep 2012 13:36:18 +0000 (15:36 +0200)]
mp3dec: read Xing frame TOC index

11 years agomp3dec: use named constants for Xing header flags
Anton Khirnov [Sat, 1 Sep 2012 22:30:41 +0000 (00:30 +0200)]
mp3dec: use named constants for Xing header flags

11 years agolibx264: add support for nal-hrd, required for Blu-ray streams.
John Van Sickle [Wed, 19 Sep 2012 17:51:29 +0000 (13:51 -0400)]
libx264: add support for nal-hrd, required for Blu-ray streams.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agomov: support random access point grouping
Yusuke Nakamura [Mon, 23 Apr 2012 23:51:29 +0000 (08:51 +0900)]
mov: support random access point grouping

Frames described by this grouping are the starter of a closed or
an open GOP.
This is useful for open GOP of H.264 stream which is not described
by sync sample atom.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agomatroskadec: properly support BlockDuration
Luca Barbato [Mon, 17 Sep 2012 00:48:02 +0000 (02:48 +0200)]
matroskadec: properly support BlockDuration

11 years agomatroskadec: split frame parsing
Luca Barbato [Sun, 16 Sep 2012 23:28:13 +0000 (01:28 +0200)]
matroskadec: split frame parsing

11 years agomatroskadec: split laces parsing
Luca Barbato [Sun, 16 Sep 2012 23:58:32 +0000 (01:58 +0200)]
matroskadec: split laces parsing

11 years agomatroska: implement support for ProRes
Luca Barbato [Fri, 14 Sep 2012 22:59:05 +0000 (00:59 +0200)]
matroska: implement support for ProRes

Support Matroska native formatting.

On demuxing prepend a Frame container atom (32bit big endian encoded
frame size and 'icpf' string).
On muxing remove it.

11 years agomatroska: implement support for ALAC
Moritz Bunkus [Fri, 14 Sep 2012 20:26:14 +0000 (22:26 +0200)]
matroska: implement support for ALAC

Support Matroska native formatting.

On demuxing reconstruct the 36-bytes QuickTime atom that the ALAC
decoder expects by prepending the "atom size", "tag" and
"tag version" fields missing from the Matroska's CodecPrivate
element.

On muxing remove the initial 12 bytes

Sample files are available:
http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska.mka
and the CoreAudio file it was created from with today's mkvmerge:
http://www.bunkus.org/videotools/mkvtoolnix/samples/alac/alac-in-matroska-source.caf

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agomatroskadec: validate lace_size when parsed
Luca Barbato [Fri, 14 Sep 2012 19:24:23 +0000 (21:24 +0200)]
matroskadec: validate lace_size when parsed

Stricter validation, explicitly exit on misparsing and some error
forwarding from the ebml parsing functions used.

11 years agomatroskadec: return meaningful errors in matroska_decode_buffer
Luca Barbato [Fri, 14 Sep 2012 18:03:37 +0000 (20:03 +0200)]
matroskadec: return meaningful errors in matroska_decode_buffer

11 years agomatroskadec: fix incorrect unsigned->signed conversion
Dale Curtis [Thu, 14 Jun 2012 22:22:25 +0000 (15:22 -0700)]
matroskadec: fix incorrect unsigned->signed conversion

11 years agomatroskadec: refactor matroska_decode_buffer
Luca Barbato [Fri, 14 Sep 2012 16:51:49 +0000 (18:51 +0200)]
matroskadec: refactor matroska_decode_buffer

Make MATROSKA_TRACK_ENCODING_COMP_HEADERSTRIP behave like
the other encodings and spare few lines of boilerplate code.

11 years agomatroskadec: check realloc in lzo encoding
Luca Barbato [Fri, 14 Sep 2012 16:39:58 +0000 (18:39 +0200)]
matroskadec: check realloc in lzo encoding

Make all the compression encodings behave the same way.

11 years agomatroska: honor error_recognition on unknown doctypes
Luca Barbato [Thu, 12 Jul 2012 11:38:50 +0000 (13:38 +0200)]
matroska: honor error_recognition on unknown doctypes

11 years agotiffdec: Add support for GRAY16LE.
Alex Converse [Wed, 19 Sep 2012 00:46:48 +0000 (17:46 -0700)]
tiffdec: Add support for GRAY16LE.

Tested with the GraphicsMagick TIFF archive and Libav generated files.

11 years agotiffenc: Add support for little endian RGB48 and GRAY16
Alex Converse [Tue, 18 Sep 2012 23:45:09 +0000 (16:45 -0700)]
tiffenc: Add support for little endian RGB48 and GRAY16

11 years agompeg4: support frame parameter changes with frame-mt
Janne Grunau [Tue, 18 Sep 2012 13:48:14 +0000 (15:48 +0200)]
mpeg4: support frame parameter changes with frame-mt

Adds a flag context_reinit to MpegEncContext to relieable keep track
of frame parameter changes which require a context reinitialization.
This is required for broken inputs which change the frame size but
error out before the context can be reinitialized.

11 years agompegvideo: check ff_find_unused_picture() return value for errors
Janne Grunau [Sat, 8 Sep 2012 13:56:52 +0000 (15:56 +0200)]
mpegvideo: check ff_find_unused_picture() return value for errors

11 years agompegvideo: release frame buffers before freeing them
Janne Grunau [Wed, 19 Sep 2012 17:39:52 +0000 (19:39 +0200)]
mpegvideo: release frame buffers before freeing them

Fixes triggering an assert in avcodec_default_release_buffer()
introduced in 1b3439b30.

11 years agoconfigure: msvc: default to 'lib' as 'ar' tool
Mans Rullgard [Mon, 17 Sep 2012 23:10:29 +0000 (00:10 +0100)]
configure: msvc: default to 'lib' as 'ar' tool

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agobuild: support some non-standard ar variants
Mans Rullgard [Mon, 17 Sep 2012 22:56:32 +0000 (23:56 +0100)]
build: support some non-standard ar variants

This adds support for the TI and Microsoft (lib.exe) variants of
the ar utility.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agorv34: use ff_MPV_common_frame_size_change()
Janne Grunau [Wed, 5 Sep 2012 18:49:18 +0000 (20:49 +0200)]
rv34: use ff_MPV_common_frame_size_change()

Specialised functionality for size changes with the advantage of
supporting frame size changes during frame-based multithreading.

11 years agompegvideo: add reinit function for frame parameter changes
Janne Grunau [Wed, 5 Sep 2012 18:40:12 +0000 (20:40 +0200)]
mpegvideo: add reinit function for frame parameter changes

This is mainly required for frame parameter changes during frame based
multithreading but single threaded usage profits too from avoiding
ff_MPV_common_end()/ff_MPV_common_init() cycles.

11 years agompegvideo: move frame size dependent memory management to separate functions
Janne Grunau [Wed, 5 Sep 2012 14:34:05 +0000 (16:34 +0200)]
mpegvideo: move frame size dependent memory management to separate functions

This is a preparation for supporting frame size changes during
frame-based multithreading.

11 years agoconfigure: add --toolchain option
Mans Rullgard [Sun, 16 Sep 2012 21:06:53 +0000 (22:06 +0100)]
configure: add --toolchain option

This allows creating canned shorthands for common combinations
of cc, ld etc.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoconfigure: Make the smoothstreaming muxer enable the ismv muxer
Martin Storsjö [Tue, 18 Sep 2012 08:34:16 +0000 (11:34 +0300)]
configure: Make the smoothstreaming muxer enable the ismv muxer

This doesn't fix any build failure, but the smoothstreaming muxer
opens a chained ismv muxer.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agosmoothstreaming: Export the mp4 codec tags
Martin Storsjö [Tue, 18 Sep 2012 08:31:44 +0000 (11:31 +0300)]
smoothstreaming: Export the mp4 codec tags

This fixes stream copy from a format that already has incompatible
codec tags set. The chained ismv muxer exports this same codec tag
list, so set it on this one as well, to allow the caller (and
lavf common code) to set them correctly.

Signed-off-by: Martin Storsjö <martin@martin.st>
11 years agomov: check for EOF in long lasting loops
Luca Barbato [Sun, 16 Sep 2012 18:32:12 +0000 (20:32 +0200)]
mov: check for EOF in long lasting loops

A quite widespread pattern in the demuxer is read a 32bit unsigned
integer and then loop till this value is reached.

Checking for EOF prevents pathological situations.

11 years agoavcodec: cleanup utils.c
Luca Barbato [Fri, 14 Sep 2012 17:18:17 +0000 (19:18 +0200)]
avcodec: cleanup utils.c

11 years agobinkaudio: remove unneeded GET_BITS_SAFE macro
Justin Ruggles [Mon, 17 Sep 2012 20:20:36 +0000 (16:20 -0400)]
binkaudio: remove unneeded GET_BITS_SAFE macro

Normal get_bits() already has overread protection.

11 years agobinkaudio: use float sample format
Justin Ruggles [Mon, 27 Aug 2012 00:41:45 +0000 (20:41 -0400)]
binkaudio: use float sample format

Use planar for DCT codec, interleaved for RDFT codec.

11 years agobinkaudio: use a different value for the coefficient scale for the DCT codec
Justin Ruggles [Mon, 17 Sep 2012 20:13:24 +0000 (16:13 -0400)]
binkaudio: use a different value for the coefficient scale for the DCT codec

Eliminates the need for vector_fmul_scalar() in each frame.

11 years agoflvenc: silence bogus warning
Benjamin Larsson [Mon, 17 Sep 2012 19:14:58 +0000 (21:14 +0200)]
flvenc: silence bogus warning

The compiler fails to figure out that enc->codec_type can only
have 3 different values.
Thus when an if/else is encountered it triggers on the possibility
of the else case has not initialized the flags variable.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agoconfigure: include flags in nm variable
Mans Rullgard [Sun, 16 Sep 2012 20:47:16 +0000 (21:47 +0100)]
configure: include flags in nm variable

This simplifies ensuring proper flags are used when the default
is overridden by the system or on the command line.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoalsdec: fix misplaced parentheses.
Clément Bœsch [Tue, 4 Sep 2012 18:30:14 +0000 (14:30 -0400)]
alsdec: fix misplaced parentheses.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years agoalsdec: check return values.
Thilo Borgmann [Tue, 27 Mar 2012 16:06:54 +0000 (18:06 +0200)]
alsdec: check return values.

Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years agoalsdec: fix number of decoded samples in first sub-block in BGMC mode.
Thilo Borgmann [Sun, 15 Apr 2012 16:07:12 +0000 (18:07 +0200)]
alsdec: fix number of decoded samples in first sub-block in BGMC mode.

Fixes CVE-2012-2790

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years agoalsdec: Fix out of ltp_gain_values read.
Thilo Borgmann [Sun, 11 Mar 2012 15:56:23 +0000 (16:56 +0100)]
alsdec: Fix out of ltp_gain_values read.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years agoalsdec: Check that quantized parcor coeffs are within range.
Michael Niedermayer [Wed, 29 Feb 2012 05:10:17 +0000 (06:10 +0100)]
alsdec: Check that quantized parcor coeffs are within range.

ALS spec:
11.6.3.1.1 Quantization and encoding of parcor coefficients
...
In all cases the resulting quantized values ak are restricted to the range [-64,63].

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years agoalsdec: check opt_order.
Michael Niedermayer [Sat, 24 Mar 2012 00:39:13 +0000 (01:39 +0100)]
alsdec: check opt_order.

Fixes out of array write in quant_cof.
Also make sure no invalid opt_order stays in the context.

Fixes CVE-2012-2775

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years agoalsdec: Check k used for rice decoder.
Michael Niedermayer [Sat, 7 Apr 2012 15:25:47 +0000 (17:25 +0200)]
alsdec: Check k used for rice decoder.

Values that fail this check will cause failure of decode_rice()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
11 years agoavfiltergraph: silence an uninitialized variable warning
Anton Khirnov [Sat, 18 Aug 2012 14:51:32 +0000 (16:51 +0200)]
avfiltergraph: silence an uninitialized variable warning

The warning is:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:528:9: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
libavfilter/avfiltergraph.c:479:13: note: ‘best_idx’ was declared here

Initialize it to an invalid value and add an assert that it's properly
set later.

11 years agoxsubenc: reindent
Anton Khirnov [Sat, 18 Aug 2012 14:42:50 +0000 (16:42 +0200)]
xsubenc: reindent

11 years agolavc: replace AVCodecContext.encode with subtitle-specific callback
Anton Khirnov [Sat, 18 Aug 2012 14:41:24 +0000 (16:41 +0200)]
lavc: replace AVCodecContext.encode with subtitle-specific callback

AVCodecContext.encode is currently used only for subtitles, encode2 is
used for audio and video.

11 years agolavc: add const to private codec class initialization.
Anton Khirnov [Sat, 18 Aug 2012 14:21:00 +0000 (16:21 +0200)]
lavc: add const to private codec class initialization.

Silences a warning about discarding const.

11 years agoavconv: don't pass a bogus parameter to avfilter_graph_create_filter().
Anton Khirnov [Sat, 18 Aug 2012 14:15:42 +0000 (16:15 +0200)]
avconv: don't pass a bogus parameter to avfilter_graph_create_filter().

The buffer sink does not take any parameters.

Fixes an uninitialized variable warning.

11 years agoid3v2: strdup the genre name explicitly.
Clément Bœsch [Sat, 12 May 2012 20:39:30 +0000 (22:39 +0200)]
id3v2: strdup the genre name explicitly.

It would have been done anyway in the av_dict_set() call.

This simplifies the code and avoid a warning because of assigning a
const string from ff_id3v1_genre_str to a non-const variable.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agolavf/id3v2: do not export empty fields.
Clément Bœsch [Sat, 12 May 2012 20:31:11 +0000 (22:31 +0200)]
lavf/id3v2: do not export empty fields.

This also avoids a memleak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agobuffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame()
Anton Khirnov [Sat, 18 Aug 2012 06:58:09 +0000 (08:58 +0200)]
buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame()

11 years agolavfi: replace empty input/output lists with null pointers
Mans Rullgard [Sun, 16 Sep 2012 11:58:49 +0000 (12:58 +0100)]
lavfi: replace empty input/output lists with null pointers

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agoavconv: flush filtered frames before reconfiguring filters
Janne Grunau [Thu, 6 Sep 2012 19:51:31 +0000 (21:51 +0200)]
avconv: flush filtered frames before reconfiguring filters

This prevents lost frames after a resolution change.

11 years agomov: stsd entries must be at least 16 byte
Michael Niedermayer [Thu, 15 Dec 2011 19:51:00 +0000 (20:51 +0100)]
mov: stsd entries must be at least 16 byte

Fix near infinite loop in stsd parsing.
Bug found by: Diana Elena Muscalu

The size is unsigned according the specification.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agomov: detect EOF in mov_read_dref()
Michael Niedermayer [Sun, 18 Dec 2011 20:37:54 +0000 (21:37 +0100)]
mov: detect EOF in mov_read_dref()

Avoid a near infinite loop.
Issue discovered by cosminamironesei.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years agofile: return proper error on seek failures
Luca Barbato [Fri, 14 Sep 2012 15:01:35 +0000 (17:01 +0200)]
file: return proper error on seek failures

11 years agompegvideo: drop unnecessary arguments to hpel_motion()
Mans Rullgard [Sat, 4 Aug 2012 01:51:27 +0000 (02:51 +0100)]
mpegvideo: drop unnecessary arguments to hpel_motion()

These arguments are either constants or copies of MpegEncContext
fields just as easily accessed within the function.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agompegvideo: drop 'inline' from some functions
Mans Rullgard [Sat, 4 Aug 2012 01:22:43 +0000 (02:22 +0100)]
mpegvideo: drop 'inline' from some functions

These functions do not benefit from being inlined.  They are large,
and there are no opportunities for constant propagation.

Signed-off-by: Mans Rullgard <mans@mansr.com>
11 years agonellymoserdec: drop support for s16 output.
Anton Khirnov [Sun, 22 Jul 2012 09:19:01 +0000 (11:19 +0200)]
nellymoserdec: drop support for s16 output.

It internally decodes as float and then converts to s16 by a call to
float_to_int16(). The caller can do this just as well by using lavr.

11 years agobmpdec: only initialize palette for pal8.
Anton Khirnov [Sun, 16 Sep 2012 06:33:09 +0000 (08:33 +0200)]
bmpdec: only initialize palette for pal8.

Gray8 is not considered to be paletted, so this would cause an invalid
write.

Fixes bug 367.

CC: libav-stable@libav.org
11 years agobuild: Properly remove object files while cleaning
Mans Rullgard [Sat, 15 Sep 2012 18:33:56 +0000 (18:33 +0000)]
build: Properly remove object files while cleaning

Previously, object files in, for example, compat/ were left
after a clean or distclean was run.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agoflacdsp: arm optimised lpc filter
Mans Rullgard [Thu, 5 Jul 2012 21:47:41 +0000 (22:47 +0100)]
flacdsp: arm optimised lpc filter

11 years agocompat/vsnprintf: return number of bytes required on truncation.
Ronald S. Bultje [Fri, 14 Sep 2012 18:56:46 +0000 (18:56 +0000)]
compat/vsnprintf: return number of bytes required on truncation.

This conforms to C99, but requires Windows >= XP.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years agoavformat: fix typo in avformat_close_input
Luca Barbato [Sat, 15 Sep 2012 18:16:32 +0000 (20:16 +0200)]
avformat: fix typo in avformat_close_input

The condition should not be &&.

11 years agomp3enc: write Xing TOC
Anton Khirnov [Mon, 10 Sep 2012 12:44:32 +0000 (14:44 +0200)]
mp3enc: write Xing TOC

Based on the code by:
Peter Belkner <pbelkner@snafu.de>,
Michael Niedermayer <michaelni@gmx.at>,
Clément Bœsch <clement.boesch@smartjog.com>,
Reimar Döffinger <Reimar.Doeffinger@gmx.de>, and
Tobias Rapp <t.rapp@noa-audio.com>
Alex Converse <alex.converse@gmail.com>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
11 years agomp3enc: support MPEG-2 and MPEG-2.5 in Xing header.
Clément Bœsch [Wed, 9 May 2012 20:39:40 +0000 (22:39 +0200)]
mp3enc: support MPEG-2 and MPEG-2.5 in Xing header.

11 years agomp3enc: downgrade some errors in writing Xing frame to warnings
Reimar Döffinger [Sun, 9 Sep 2012 18:39:40 +0000 (20:39 +0200)]
mp3enc: downgrade some errors in writing Xing frame to warnings

Also clarify the meaning of the log message.

11 years agolavf: flush the output AVIOContext in av_write_trailer().
Anton Khirnov [Sun, 9 Sep 2012 19:35:23 +0000 (21:35 +0200)]
lavf: flush the output AVIOContext in av_write_trailer().

This is consistent with stdio and is what we want to do in all cases.

Fixes a bug in the voc muxer which didn't flush in write_trailer()
previously. This is the cause of the change in the test results.

11 years agolavf: cosmetics, reformat av_write_trailer().
Anton Khirnov [Sun, 9 Sep 2012 18:47:38 +0000 (20:47 +0200)]
lavf: cosmetics, reformat av_write_trailer().