Commit Graph

32358 Commits

Author SHA1 Message Date
Ronald S. Bultje 32a659c758 aiff: don't skip block_align==0 check on COMM-after-SSND files.
This prevents SIGFPEs when using block_align for divisions.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 15:59:03 -08:00
Alex Converse ce7aee9b73 dpcm: ignore extra unpaired bytes in stereo streams.
Fixes: CVE-2011-3951

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-17 15:42:23 -08:00
Ronald S. Bultje 3e13005cac mp3on4: require a minimum framesize.
If bufsize < headersize, init_get_bits() will be called with a negative
number, causing it to fail and any subsequent call to get_bits() will
crash because it reads from a NULL pointer.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 15:32:23 -08:00
Ronald S. Bultje c0994e39d7 mpc7: assign an error level + context to av_log() msg. 2012-02-17 15:28:35 -08:00
Ronald S. Bultje 84c202cc37 huffyuv: error out on bit overrun.
On EOF, get_bits() will continuously return 0, causing an infinite
loop.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 15:23:20 -08:00
Martin Storsjö 0733375059 dct-test: Add the missing ff_ prefix to the altivec functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 00:22:25 +02:00
Martin Storsjö 89baf35996 dct-test: Remove a stray declaration of a nonexistent function
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 00:22:24 +02:00
Martin Storsjö 5302633919 movenc: Write the unknown duration as 64 bit fields in ismv
This is required for the files to play back properly in
windows media player.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 00:03:32 +02:00
Martin Storsjö 99a357f4c5 movenc: Write track durations with all bits set if duration is unknown
According to 14496-12, the duration should be all 1s if
the duration is unknown. This is the case if writing a moov
atom without any samples described in it (e.g. as in ismv files).

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-18 00:03:30 +02:00
Ronald S. Bultje af468015d9 als: prevent infinite loop in zero_remaining().
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 12:35:08 -08:00
Ronald S. Bultje 941fc1ea1e cook: prevent div-by-zero if channels is zero.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-17 12:35:07 -08:00
Anton Khirnov e9b380a7a5 pamenc: switch to encode2(). 2012-02-17 20:46:37 +01:00
Anton Khirnov 3cc77ded4f svq1enc: switch to encode2(). 2012-02-17 20:46:37 +01:00
Anton Khirnov 6a047213ac dvenc: switch to encode2(). 2012-02-17 20:46:37 +01:00
Anton Khirnov b3566a6a39 dpxenc: switch to encode2(). 2012-02-17 20:46:37 +01:00
Anton Khirnov 83c7fe3245 pngenc: switch to encode2(). 2012-02-17 20:46:37 +01:00
Anton Khirnov ab3a410cf0 v210enc: switch to encode2(). 2012-02-17 20:46:37 +01:00
Anton Khirnov f0366fec56 xwdenc: switch to encode2(). 2012-02-17 20:46:37 +01:00
Justin Ruggles f2a4559c77 ttadec: use branchless unsigned-to-signed unfolding 2012-02-17 14:35:35 -05:00
Aneesh Dogra d7840529b6 avcodec: add a Sun Rasterfile encoder
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:28:56 -05:00
Aneesh Dogra 1f1fbcfa71 sunrast: Move common defines to a new header file.
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:23:40 -05:00
Paul B Mahol b5c626fdf3 cdxl: fix video decoding for some files
Width is padded for ham encodings too.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:20:18 -05:00
Paul B Mahol 6d10c5bfc0 cdxl: fix audio for some samples
There may be extra padding at and of chunk.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:19:35 -05:00
Paul B Mahol f02edc4c06 apetag: add proper support for binary tags
export as attachment streams

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 14:16:11 -05:00
Paul B Mahol 323b9da969 ttadec: remove dead code
The unused code being removed is for encoding only and therefore is not needed
by the decoder.

Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-17 13:38:09 -05:00
Ronald S. Bultje 1bab6f852c swscale: make access to filter data conditional on filter type.
Prevents crashes on 1-tap filter (unscaled). Also rename "bguf" argument
to "vbuf", seems that was a typo.
2012-02-17 10:31:15 -08:00
Ronald S. Bultje a95e3fa90b swscale: update context offsets after removal of AlpMmxFilter. 2012-02-17 10:31:15 -08:00
Kostya Shishkov 5d9ad5425f prores: initialise encoder and decoder parts only when needed 2012-02-17 14:11:48 +01:00
Ronald S. Bultje 25c42234a9 swscale: make monowhite/black RGB-independent.
Disadvantage is that it no longer allows modifying brightness through
adjustment of the RGB lookup table. Advantage is that now monowhite/black
no longer need to be identified as a RGB format.
2012-02-16 21:43:20 -08:00
Ronald S. Bultje 52e4018be4 flac: fix infinite loops on all-zero input or end-of-stream.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-16 17:08:29 -08:00
Ronald S. Bultje b4027d9749 wmapro: change max. block size to 13 bits.
WMApro actually support 13-bits block sizes (potentially even up to 14),
and thus we should support that also. If we get block sizes beyond what
the decoder can handle (14 is possible depending on s->decode_flags),
error out instead of crashing.
2012-02-16 16:15:36 -08:00
Michael Niedermayer 204cb29b3c shorten: Use separate pointers for the allocated memory for decoded samples.
Fixes invalid free() if any of the buffers are not allocated due to either
not decoding a header or an error prior to allocating all buffers.

Fixes CVE-2012-0858
CC: libav-stable@libav.org

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-16 15:18:45 -05:00
Michael Niedermayer c509f4f747 atrac3: Fix crash in tonal component decoding.
Add a check to avoid writing past the end of the channel_unit.components[]
array.

Bug Found by: cosminamironesei
Fixes CVE-2012-0853
CC: libav-stable@libav.org

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-16 15:18:45 -05:00
Michael Niedermayer 9fb7a5af97 ws_snd1: Fix wrong samples counts.
This makes the check that avoids overwrite of the samples array actually
work properly.

fixes CVE-2012-0848
CC: libav-stable@libav.org

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
2012-02-16 15:18:45 -05:00
Martin Storsjö 51df7b232f movenc: Don't set a default sample duration when creating ismv
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-16 17:49:07 +01:00
Martin Storsjö 298a587f44 rtp: Factorize the check for distinguishing RTCP packets from RTP
The binary doesn't change after this patch.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-16 17:45:33 +01:00
Ronald S. Bultje c6643fddba golomb: avoid infinite loop on all-zero input (or end of buffer).
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-16 08:36:08 -08:00
Justin Ruggles c9fdf3241a bethsoftvid: synchronize video timestamps with audio sample rate
According to unofficial documentation, the video rate is locked to the audio
sample rate. This results in proper synchronization of audio and video
timestamps from the demuxer. This only works if the first audio packet occurs
before the first video packet or the audio sample rate is the default rate of
11111 Hz, both of which are true for all samples in our archive.
2012-02-16 10:47:11 -05:00
Justin Ruggles 773ff823da bethsoftvid: add audio stream only after getting the first audio packet
This avoids initializing a stream with dummy values or when the file does not
contain audio.
Also set duration for audio packets, using the sample rate as the time base.
2012-02-16 10:47:11 -05:00
Justin Ruggles 9546f331c6 bethsoftvid: Set video packet duration instead of accumulating pts. 2012-02-16 10:47:11 -05:00
Justin Ruggles 05e4ae833c bethsoftvid: set packet key frame flag for audio and I-frame video packets.
Fixes avconv video stream copy of bethsoft video, which was skipping all
video frames unless the copyinkf option was used.
2012-02-16 10:47:11 -05:00
Justin Ruggles 17b115591f bethsoftvid: fix read_packet() return codes.
Use proper AVERROR codes, and return 0 for no error.
2012-02-16 10:47:11 -05:00
Justin Ruggles f320fb894c bethsoftvid: pass palette in side data instead of in a separate packet.
Update FATE reference to account for now non-existent palette packet.
This also fixes the FATE test if frame data is not initialized in
get_buffer(), so update comment in avconv accordingly.
2012-02-16 10:47:11 -05:00
Martin Storsjö f3a094f2da sdp: Ignore RTCP packets when autodetecting RTP streams
The rtp demuxer which listens for RTP packets and detects the
RTP payload type will currently get confused if the first packet
received is an RTCP packet. Thus ignore such packets.

Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-16 16:14:35 +01:00
Kostya Shishkov 17b11ffec7 proresenc: initialise 'sign' variable 2012-02-16 06:48:24 +01:00
Christophe GISQUET f3e084909b mpegaudio: replace memcpy by SIMD code
By replacing memcpy with an unrolled loop using the alignment knowledge
it has, some speedup can be obtained.

Before (gcc 4.6.1): ~400 cycles
After: ~370 cycles

Overall, around 2% speed increase when decoding a 2400s mp3 to f32le.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2012-02-15 20:11:54 -08:00
Ronald S. Bultje ae591aeea5 vc1: prevent using last_frame as a reference for I/P first frame.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-15 19:58:10 -08:00
Martin Storsjö 210f72845c ppc: Add ff_ prefix to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:29 +02:00
Martin Storsjö f73673a770 sh4: Add ff_ prefix to nonstatic symbols
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:26 +02:00
Martin Storsjö efd29844eb mpegvideo: Add ff_ prefix to nonstatic functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2012-02-15 22:07:23 +02:00