OSDN Git Service

android-x86/external-ffmpeg.git
10 years agolavf: Make probe_codec return an error code
Alexandra Khirnova [Thu, 12 Sep 2013 08:39:22 +0000 (10:39 +0200)]
lavf: Make probe_codec return an error code

This allows handling errors from av_realloc properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agox86: Add an xmm clobbering wrapper for avcodec_encode_video2
Martin Storsjö [Mon, 16 Sep 2013 16:31:03 +0000 (19:31 +0300)]
x86: Add an xmm clobbering wrapper for avcodec_encode_video2

This is required since 187105ff8 when we started trying to
wrap this function as well.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agolavf: Don't explicitly flush after each written packet in muxers
Clément Bœsch [Sun, 24 Mar 2013 23:23:46 +0000 (00:23 +0100)]
lavf: Don't explicitly flush after each written packet in muxers

Since 596e5d4783, this is not necessary anymore. It also allows to
actually disable the flushing, improving write performance (but
possibly giving worse latency in real-time streaming).

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agolavf: Add a flag to enable/disable per-packet flushing
Luca Barbato [Wed, 11 Sep 2013 12:02:06 +0000 (14:02 +0200)]
lavf: Add a flag to enable/disable per-packet flushing

This is enabled by default and can be disabled with
"-fflags -flush_packets".

Inspired by a patch from Nicolas George <nicolas.george@normalesup.org>.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoflv: Do not export datastream as metadata
Luca Barbato [Mon, 16 Sep 2013 16:09:12 +0000 (18:09 +0200)]
flv: Do not export datastream as metadata

It is used internally.

10 years agortmp: Store all the notify messages
Luca Barbato [Mon, 16 Sep 2013 15:42:59 +0000 (17:42 +0200)]
rtmp: Store all the notify messages

The onTextData is used to implement text data streams in flv.

10 years agortmp: Do not send the first field twice within the handshake
Luca Barbato [Mon, 16 Sep 2013 09:39:45 +0000 (11:39 +0200)]
rtmp: Do not send the first field twice within the handshake

10 years agortmp: Drop an unneeded warning
Luca Barbato [Mon, 16 Sep 2013 09:37:48 +0000 (11:37 +0200)]
rtmp: Drop an unneeded warning

Apparently a widely used streaming server requires that the second
field always presents a version during C1 phase.

10 years agortmp: Support play method in listen mode
Luca Barbato [Sun, 15 Sep 2013 14:52:33 +0000 (16:52 +0200)]
rtmp: Support play method in listen mode

10 years agortmp: Factor out publish specific code
Luca Barbato [Sat, 14 Sep 2013 14:41:50 +0000 (16:41 +0200)]
rtmp: Factor out publish specific code

Will be reused for supporting play.

10 years agomem: Introduce av_reallocp
Luca Barbato [Sun, 15 Sep 2013 19:42:07 +0000 (21:42 +0200)]
mem: Introduce av_reallocp

10 years agoFix references to deleted avcodec_encode_video() function
Vittorio Giovara [Tue, 10 Sep 2013 10:31:46 +0000 (12:31 +0200)]
Fix references to deleted avcodec_encode_video() function

10 years agoavpacket: Fix error checking in packet_alloc
Martin Storsjö [Wed, 11 Sep 2013 20:09:37 +0000 (23:09 +0300)]
avpacket: Fix error checking in packet_alloc

Previously the wrong buffer pointer was checked, when buf
instead of *buf was checked. But checking the return value
instead is even better.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovp3: Check the framerate for validity
Martin Storsjö [Thu, 12 Sep 2013 09:27:58 +0000 (12:27 +0300)]
vp3: Check the framerate for validity

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoproresdec: Properly make sure an index doesn't run past the limit
Martin Storsjö [Thu, 12 Sep 2013 09:10:18 +0000 (12:10 +0300)]
proresdec: Properly make sure an index doesn't run past the limit

If idx equaled num_coeffs - 1 on entry to the loop, the previous
check failed to break out of the loop.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agocavsdec: Make sure a sequence header has been decoded before decoding pictures
Martin Storsjö [Thu, 12 Sep 2013 08:58:25 +0000 (11:58 +0300)]
cavsdec: Make sure a sequence header has been decoded before decoding pictures

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agovocdec: Don't update codec parameters mid-stream
Martin Storsjö [Thu, 12 Sep 2013 08:31:53 +0000 (11:31 +0300)]
vocdec: Don't update codec parameters mid-stream

If we really want to support parameter changes, they need to be
signalled along with the AVPackets as parameter change side data,
not just changing the AVCodecContext parameters when a packet
is demuxed (since there may be other earlier packets yet undecoded).

Something similar was already done for the sample rate in 0883109b2,
but some parameters were left changeable.

This avoids having to recheck the channel count for validity for
each decoded frame in (ad)pcm decoders, unless the decoders
explicitly say that they accept parameter changes.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosierravmd: Do sanity checking of frame sizes
Martin Storsjö [Wed, 11 Sep 2013 19:56:55 +0000 (22:56 +0300)]
sierravmd: Do sanity checking of frame sizes

Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + BYTES_PER_FRAME_RECORD won't overflow.

Also factorize other existing error return paths.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoomadec: Properly check lengths before incrementing the position
Martin Storsjö [Wed, 11 Sep 2013 11:54:05 +0000 (14:54 +0300)]
omadec: Properly check lengths before incrementing the position

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomathops/x86: work around inline asm miscompilation with GCC 4.8.1
Hendrik Leppkes [Sat, 15 Jun 2013 20:46:01 +0000 (22:46 +0200)]
mathops/x86: work around inline asm miscompilation with GCC 4.8.1

The volatile is not required here, and prevents a miscompilation with GCC
4.8.1 when building on x86 with --cpu=i686

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
10 years agomem: Document the non-compatibility of av_realloc() and av_malloc()
Diego Biurrun [Fri, 13 Sep 2013 18:01:30 +0000 (20:01 +0200)]
mem: Document the non-compatibility of av_realloc() and av_malloc()

10 years agopcm-dvd: Minor leftovers
Christian Schmidt [Wed, 11 Sep 2013 14:17:13 +0000 (16:17 +0200)]
pcm-dvd: Minor leftovers

Drop a pointless branch in uninit and use the compact copyright.

10 years agopcm-dvd: Support channel configuration changes
Christian Schmidt [Wed, 11 Sep 2013 14:12:27 +0000 (16:12 +0200)]
pcm-dvd: Support channel configuration changes

The sample buffering logic does not take into account that the blocksize
could change. Reset the buffer if the channel configuration changes,
since if there are leftover samples, it is most likely a broken or
misconcatenated stream. This could lead to negative numbers for
missing_samples during decoding.

Thanks to Michael Niedermeyer for pointing these out.

10 years agomatroskaenc: Fix stray pointers left over from av_reallocp_array refactoring
Alexandra Khirnova [Thu, 12 Sep 2013 07:49:38 +0000 (09:49 +0200)]
matroskaenc: Fix stray pointers left over from av_reallocp_array refactoring

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agomp3: add .mpa extension
Vittorio Giovara [Mon, 9 Sep 2013 14:30:35 +0000 (16:30 +0200)]
mp3: add .mpa extension

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agoconfigure: Mention that icl does not build both static and shared libs
Diego Biurrun [Tue, 10 Sep 2013 10:28:19 +0000 (12:28 +0200)]
configure: Mention that icl does not build both static and shared libs

10 years agog2meet: Allocate cursor buffers large enough to fit the aligned width
Martin Storsjö [Wed, 11 Sep 2013 20:40:12 +0000 (23:40 +0300)]
g2meet: Allocate cursor buffers large enough to fit the aligned width

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoaic: Validate values read from the bitstream
Martin Storsjö [Wed, 11 Sep 2013 20:25:04 +0000 (23:25 +0300)]
aic: Validate values read from the bitstream

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agompc8: Make sure the first stream exists before parsing the seek table
Martin Storsjö [Wed, 11 Sep 2013 19:53:15 +0000 (22:53 +0300)]
mpc8: Make sure the first stream exists before parsing the seek table

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agompc8: Check the seek table size parsed from the bitstream
Martin Storsjö [Wed, 11 Sep 2013 19:47:06 +0000 (22:47 +0300)]
mpc8: Check the seek table size parsed from the bitstream

Limit the size to INT_MAX/2 (for simplicity) to be sure that
size + FF_INPUT_BUFFER_PADDING_SIZE won'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 agozmbvdec: Check the buffer size for uncompressed data
Michael Niedermayer [Sun, 11 Nov 2012 17:08:39 +0000 (18:08 +0100)]
zmbvdec: Check the buffer size for uncompressed data

Also don't pointlessly set the buffer size to 1 after copying
one packet.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoape: Don't allow the seektable to be omitted
Martin Storsjö [Wed, 11 Sep 2013 19:29:33 +0000 (22:29 +0300)]
ape: Don't allow the seektable to be omitted

The seektable is required for filling in ape->frames[i].pos
further down.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoshorten: Break out of loop looking for fmt chunk if none is found
Martin Storsjö [Wed, 11 Sep 2013 19:19:28 +0000 (22:19 +0300)]
shorten: Break out of loop looking for fmt chunk if none is found

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoshorten: Use a checked bytestream reader for the wave header
Martin Storsjö [Wed, 11 Sep 2013 19:17:13 +0000 (22:17 +0300)]
shorten: Use a checked bytestream reader for the wave header

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosmacker: Free memory properly if the init function fails
Martin Storsjö [Wed, 11 Sep 2013 12:55:18 +0000 (15:55 +0300)]
smacker: Free memory properly if the init function fails

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosmacker: Make sure we don't fill in huffman codes out of range
Martin Storsjö [Wed, 11 Sep 2013 12:54:20 +0000 (15:54 +0300)]
smacker: Make sure we don't fill in huffman codes out of range

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosmacker: Check malloc return values
Martin Storsjö [Wed, 11 Sep 2013 12:35:19 +0000 (15:35 +0300)]
smacker: Check malloc return values

Also try to free local allocations on errors.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosmacker: Avoid integer overflow when allocating packets
Martin Storsjö [Wed, 11 Sep 2013 12:25:13 +0000 (15:25 +0300)]
smacker: Avoid integer overflow when allocating packets

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agosmacker: Don't return packets in unallocated streams
Martin Storsjö [Wed, 11 Sep 2013 12:20:01 +0000 (15:20 +0300)]
smacker: Don't return packets in unallocated streams

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agodsicin: Add some basic sanity checks for fields read from the file
Martin Storsjö [Wed, 11 Sep 2013 12:13:48 +0000 (15:13 +0300)]
dsicin: Add some basic sanity checks for fields read from the file

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoconfigure: Fix wrong reference to user support mailing list
Diego Biurrun [Tue, 10 Sep 2013 10:42:10 +0000 (12:42 +0200)]
configure: Fix wrong reference to user support mailing list

10 years agoDrop pointless directory name prefixes from #includes in the current dir
Diego Biurrun [Tue, 10 Sep 2013 06:30:54 +0000 (08:30 +0200)]
Drop pointless directory name prefixes from #includes in the current dir

10 years agodoc: Drop VDPAU from list of supported codecs
Diego Biurrun [Tue, 10 Sep 2013 06:30:42 +0000 (08:30 +0200)]
doc: Drop VDPAU from list of supported codecs

10 years agofate.sh: Run git-clone quietly
Diego Biurrun [Tue, 10 Sep 2013 06:26:27 +0000 (08:26 +0200)]
fate.sh: Run git-clone quietly

10 years agoavformat: Use av_reallocp_array() where suitable
Alexandra Khirnova [Tue, 10 Sep 2013 09:57:35 +0000 (11:57 +0200)]
avformat: Use av_reallocp_array() where suitable

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agomovenc: Simplify setting the fragmentation flag
Martin Storsjö [Mon, 9 Sep 2013 11:35:09 +0000 (14:35 +0300)]
movenc: Simplify setting the fragmentation flag

This makes sure the faststart vs fragmentation check works as
intended when fragmentation is enabled due to using the ismv mode.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Add a warning message if conflicting options have been specified
Martin Storsjö [Mon, 9 Sep 2013 11:13:55 +0000 (14:13 +0300)]
movenc: Add a warning message if conflicting options have been specified

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agotcp: Explicitly convert a pointer to a boolean integer
Martin Storsjö [Mon, 9 Sep 2013 08:28:14 +0000 (11:28 +0300)]
tcp: Explicitly convert a pointer to a boolean integer

This fixes warnings about making integers from pointers without
a cast, and avoids the theoretical case where the lower 32 bits of
the pointer would all be zero where the implicit cast wouldn't give
the right result.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agolavf: fix the comparison in an overflow check
Anton Khirnov [Wed, 4 Sep 2013 06:55:08 +0000 (08:55 +0200)]
lavf: fix the comparison in an overflow check

CC: libav-stable@libav.org
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agodv: Add a guard to not overread the ppcm array
Luca Barbato [Mon, 5 Aug 2013 20:15:24 +0000 (22:15 +0200)]
dv: Add a guard to not overread the ppcm array

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agonuv: check ff_rtjpeg_decode_frame_yuv420 return value
Luca Barbato [Sun, 11 Aug 2013 18:35:40 +0000 (20:35 +0200)]
nuv: check ff_rtjpeg_decode_frame_yuv420 return value

CC: libav-stable@libav.org
10 years agoavisynth: K&R formatting cosmetics
Diego Biurrun [Wed, 4 Sep 2013 18:01:59 +0000 (20:01 +0200)]
avisynth: K&R formatting cosmetics

10 years agoavisynth: Add missing #include for NULL_IF_CONFIG_SMALL
Diego Biurrun [Wed, 4 Sep 2013 18:03:14 +0000 (20:03 +0200)]
avisynth: Add missing #include for NULL_IF_CONFIG_SMALL

10 years agoavcodec: Stop exporting the removed audio_resample* symbols
Diego Biurrun [Thu, 5 Sep 2013 10:05:57 +0000 (12:05 +0200)]
avcodec: Stop exporting the removed audio_resample* symbols

10 years agompeg12enc: K&R formatting cosmetics
Vittorio Giovara [Wed, 4 Sep 2013 15:17:30 +0000 (17:17 +0200)]
mpeg12enc: K&R formatting cosmetics

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agompeg12enc: drop forward declarations
Vittorio Giovara [Wed, 4 Sep 2013 15:17:29 +0000 (17:17 +0200)]
mpeg12enc: drop forward declarations

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agomem: Do not check unsigned values for negative size
Diego Biurrun [Wed, 4 Sep 2013 10:28:01 +0000 (12:28 +0200)]
mem: Do not check unsigned values for negative size

10 years agomem: Improve documentation wording and spelling
Diego Biurrun [Wed, 4 Sep 2013 10:27:09 +0000 (12:27 +0200)]
mem: Improve documentation wording and spelling

10 years agomatroskaenc: Allow chapters to be written in trailer
John Stebbins [Tue, 3 Sep 2013 17:53:34 +0000 (10:53 -0700)]
matroskaenc: Allow chapters to be written in trailer

This allows creation of frame accurate chapter marks from sources like
DVD and BD where the precise chapter location is not known until the
chapter mark has been reached during reading.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years agompegvideo: Avoid 32-bit wrapping of linesize multiplications
Martin Storsjö [Tue, 3 Sep 2013 22:36:51 +0000 (01:36 +0300)]
mpegvideo: Avoid 32-bit wrapping of linesize multiplications

This makes sure that linesize * start_y doesn't overflow, so that
emulated_edge_mc can get back the original value if needed.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agodoc: Describe TB option of setpts filter
Clifford Wolf [Sun, 1 Sep 2013 09:07:17 +0000 (11:07 +0200)]
doc: Describe TB option of setpts filter

Signed-off-by: Diego Biurrun <diego@biurrun.de>
10 years agomem: Document the av_realloc family of functions properly
Luca Barbato [Sun, 1 Sep 2013 17:46:59 +0000 (19:46 +0200)]
mem: Document the av_realloc family of functions properly

realloc() does not accept pointers from memalign().

10 years agobuild: Report an error message when a pc file is not found
Luca Barbato [Tue, 3 Sep 2013 20:15:23 +0000 (22:15 +0200)]
build: Report an error message when a pc file is not found

Ease tracking path problems.

10 years agomjpegb: Detect changing number of planes in interlaced video
Michael Niedermayer [Sat, 10 Mar 2012 21:02:46 +0000 (22:02 +0100)]
mjpegb: Detect changing number of planes in interlaced video

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoalac: Check that the channels fit at the given offset
Martin Storsjö [Tue, 3 Sep 2013 11:16:40 +0000 (14:16 +0300)]
alac: Check that the channels fit at the given offset

The code tries to decode a number of channels at the
offset given by the ff_alac_channel_layout_offsets table.
Even if the number of channels decoded so far doesn't
exceed the total number of channels, we need to check that
we actually can decode that number of channels at this offset
as well.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago4xm: Check that the read track value is non-negative
Martin Storsjö [Tue, 3 Sep 2013 10:53:23 +0000 (13:53 +0300)]
4xm: Check that the read track value is non-negative

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomatroskadec: Check that .lang was allocated and set before reading it
Martin Storsjö [Tue, 3 Sep 2013 09:10:50 +0000 (12:10 +0300)]
matroskadec: Check that .lang was allocated and set before reading it

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoalac: Limit max_samples_per_frame
Martin Storsjö [Tue, 3 Sep 2013 08:54:03 +0000 (11:54 +0300)]
alac: Limit max_samples_per_frame

Otherwise buffer size calculations in allocate_buffers could
overflow later, making the code think a large enough buffer
actually was allocated.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agomovenc: Don't flush after each written packet
Martin Storsjö [Mon, 2 Sep 2013 13:23:17 +0000 (16:23 +0300)]
movenc: Don't flush after each written packet

This should improve write performance quite significantly.
---
Tested with both writing a normal mp4, by using the faststart
feature and writing a fragmented mp4 file; all turn out with the
same md5sum as before.

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agocosmetics: Fix ATRAC codec name spelling
Diego Biurrun [Mon, 2 Sep 2013 18:21:49 +0000 (20:21 +0200)]
cosmetics: Fix ATRAC codec name spelling

10 years agoape demuxer: check for EOF in potentially long loops
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
ape demuxer: check for EOF in potentially long loops

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years ago4xm: check that bits per sample is strictly positive
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
4xm: check that bits per sample is strictly positive

Avoids a divide by zero.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agolavf: avoid integer overflow when estimating bitrate
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
lavf: avoid integer overflow when estimating bitrate

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agolavf: move a variable declaration to the block where it's used
Anton Khirnov [Sun, 25 Aug 2013 09:53:34 +0000 (11:53 +0200)]
lavf: move a variable declaration to the block where it's used

10 years agopictordec: pass correct context to avpriv_request_sample
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
pictordec: pass correct context to avpriv_request_sample

Fixes invalid reads.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agopictordec: break out of both decoding loops when y drops below 0
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
pictordec: break out of both decoding loops when y drops below 0

Otherwise picmemset can get called with negative y, resulting in an
invalid write.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agovcr1: add sanity checks
Anton Khirnov [Sat, 24 Aug 2013 19:30:46 +0000 (21:30 +0200)]
vcr1: add sanity checks

Fixes invalid reads with corrupted files.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
10 years agopcm-dvd: Fix build on big endian
Martin Storsjö [Sat, 31 Aug 2013 15:35:33 +0000 (17:35 +0200)]
pcm-dvd: Fix build on big endian

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agoconfigure: Add docdir configuration option
Vittorio Giovara [Wed, 28 Aug 2013 08:30:14 +0000 (10:30 +0200)]
configure: Add docdir configuration option

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agovf_lut: Constantize
Diego Elio Pettenò [Sat, 31 Aug 2013 10:30:16 +0000 (03:30 -0700)]
vf_lut: Constantize

The pixel format tables are never modified, mark them as constant.

Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agopcm_dvd: consolidate pieces from pcm.c and mpeg.c
Christian Schmidt [Fri, 30 Aug 2013 16:15:47 +0000 (18:15 +0200)]
pcm_dvd: consolidate pieces from pcm.c and mpeg.c

Remove the header decoding for PCM audio from mpeg.c and the
20/24bit parts from pcm.c and merge them into a new decoder in
pcm-dvd.c.

The decoder has added support for samples that span multiple
packets and modified 20/24bit group decoding. Both is needed to
decode samples that have been generated with DVD-Lab Pro 2. The
decoding of 16bit PCM and two channel 24bit is identical to
before. No other samples are known to verify the correctness of
the encoding this software does.
The complete list of tested formats is
48kHz/16bit/2-8 channels
48kHz/24bit/2-5 channels
96kHz/16bit/2-4 channels
96kHz/24bit/2 channels

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years agopcm_bluray: cosmetics
Christian Schmidt [Fri, 30 Aug 2013 16:15:46 +0000 (18:15 +0200)]
pcm_bluray: cosmetics

10 years agopcm_bluray: rename pcm-mpeg.c to pcm-bluray.c
Christian Schmidt [Fri, 30 Aug 2013 16:15:44 +0000 (18:15 +0200)]
pcm_bluray: rename pcm-mpeg.c to pcm-bluray.c

The original idea was to collect PCM codecs that could appear in various
MPEG streams in this file. Discussion in IRC lead to the conclusion that
one codec per file would be better and stop the need for #ifdefs.

10 years agoppc: don't return a value from a function declared void
Sean McGovern [Thu, 29 Aug 2013 14:39:31 +0000 (10:39 -0400)]
ppc: don't return a value from a function declared void

Signed-off-by: Martin Storsjö <martin@martin.st>
10 years agox86: avcodec: Consistently structure CPU extension initialization
Diego Biurrun [Tue, 20 Aug 2013 13:32:00 +0000 (15:32 +0200)]
x86: avcodec: Consistently structure CPU extension initialization

10 years agox86: avcodec: Use convenience macros to check for CPU flags
Diego Biurrun [Tue, 20 Aug 2013 12:46:58 +0000 (14:46 +0200)]
x86: avcodec: Use convenience macros to check for CPU flags

10 years agox86: Add and use more convenience macros to check CPU extension availability
Diego Biurrun [Tue, 20 Aug 2013 12:39:36 +0000 (14:39 +0200)]
x86: Add and use more convenience macros to check CPU extension availability

10 years agoppc: cosmetics: Consistently format CPU flag detection invocations
Diego Biurrun [Fri, 23 Aug 2013 16:50:53 +0000 (18:50 +0200)]
ppc: cosmetics: Consistently format CPU flag detection invocations

10 years agocosmetics: Place arch initialization calls in alphabetical order
Diego Biurrun [Tue, 20 Aug 2013 16:24:27 +0000 (18:24 +0200)]
cosmetics: Place arch initialization calls in alphabetical order

10 years agoarm: fmtconvert: Split armv6 fmtconvert code off from vfp code
Diego Biurrun [Fri, 23 Aug 2013 18:01:36 +0000 (20:01 +0200)]
arm: fmtconvert: Split armv6 fmtconvert code off from vfp code

10 years agoarm: float_dsp: Propagate cpu_flags to vfp initialization function
Diego Biurrun [Fri, 23 Aug 2013 17:39:21 +0000 (19:39 +0200)]
arm: float_dsp: Propagate cpu_flags to vfp initialization function

10 years agoarm: dcadsp: Move synth filter initialization to dcadsp file
Diego Biurrun [Fri, 23 Aug 2013 16:15:32 +0000 (18:15 +0200)]
arm: dcadsp: Move synth filter initialization to dcadsp file

10 years agoswscale: cosmetics: Drop silly camelCase from swScale function pointer name
Diego Biurrun [Sun, 25 Aug 2013 15:30:05 +0000 (17:30 +0200)]
swscale: cosmetics: Drop silly camelCase from swScale function pointer name

10 years agoswscale: Add some missing av_cold to arch-specific init functions
Diego Biurrun [Tue, 20 Aug 2013 08:52:54 +0000 (10:52 +0200)]
swscale: Add some missing av_cold to arch-specific init functions

10 years agoswscale: consistent names for arch-specific acceleration functions
Diego Biurrun [Tue, 20 Aug 2013 08:48:40 +0000 (10:48 +0200)]
swscale: consistent names for arch-specific acceleration functions

10 years agoswscale: ppc: Hide arch-specific initialization details
Diego Biurrun [Wed, 10 Oct 2012 23:06:04 +0000 (01:06 +0200)]
swscale: ppc: Hide arch-specific initialization details

Also give consistent names to init functions.

10 years agoppc: Add missing AltiVec cpuflag detection invocations
Diego Biurrun [Fri, 23 Aug 2013 16:48:17 +0000 (18:48 +0200)]
ppc: Add missing AltiVec cpuflag detection invocations

10 years agoppc: fdct: Remove vim editor settings comment
Diego Biurrun [Fri, 23 Aug 2013 16:46:49 +0000 (18:46 +0200)]
ppc: fdct: Remove vim editor settings comment

10 years agompegvideo: Replace arch initialization ifdeffery by standard conditionals
Diego Biurrun [Tue, 20 Aug 2013 16:25:04 +0000 (18:25 +0200)]
mpegvideo: Replace arch initialization ifdeffery by standard conditionals

10 years agox86: rv40dsp: Move inline assembly optimizations out of YASM init section
Diego Biurrun [Tue, 20 Aug 2013 13:26:02 +0000 (15:26 +0200)]
x86: rv40dsp: Move inline assembly optimizations out of YASM init section