Alex Converse and Diego Biurrun
40f81769ae
options_table: Add some missing #includes to fix "make checkheaders".
...
Signed-off-by: Diego Biurrun <diego@biurrun.de >
2012-05-08 20:05:20 +02:00
Alex Converse
3607dc2b1a
doc: Replace a stray reference to the old '-intra' flag.
2012-05-08 10:58:35 -07:00
Alex Converse
fa8fc3b73a
fate: Change the probe-format refs to match the final text format committed.
2012-05-07 11:01:38 -07:00
Alex Converse
6345209a7d
fate: Add avprobe as a make dependency
2012-05-07 11:00:54 -07:00
Alex Converse
37ddd38332
celp filters: Do not read earlier than the start of the 'out' vector.
...
CC: libav-stable@libav.org
2012-05-04 10:55:31 -07:00
Alex Converse
b5da848fac
motionpixels: Clip YUV values after applying a gradient.
...
Prevents illegal reads on truncated and malformed input.
CC: libav-stable@libav.org
2012-05-02 13:06:09 -07:00
Alex Converse
7eacd70fea
aac: Handle HE-AACv2 when sniffing a channel order.
2012-04-20 14:06:28 -07:00
Alex Converse
dc878b96a7
movenc: Support high sample rates in isomedia formats by setting the sample rate field in stsd to 0.
...
Libisomediafile appears to always set this field to zero.
2012-04-20 13:45:35 -07:00
Alex Converse
df8d5eaa14
avcodec_string: Favor AVCodecContext.codec over the default codec.
...
This improves output for formats with more than one AVCodec.
2012-04-17 14:51:23 -07:00
Alex Converse
b5d2bf964b
cook: Make constants passed to AV_BE2NE32C() unsigned to avoid signed overflow.
2012-04-17 14:51:23 -07:00
Alex Converse
9fb7e14635
aacdec: More robust output configuration.
...
Save the old output configuration (if it has been used
successfully) when trying a new configuration. If the new configuration
fails to decode, restore the last successful configuration.
2012-04-16 14:09:52 -07:00
Alex Converse
ca332b1d8c
faac: Add .channel_layouts
2012-04-16 14:09:51 -07:00
Alex Converse
f346b6bbeb
tiffdec: K&R cosmetics
2012-04-13 12:58:19 -07:00
Alex Converse
90a4306007
tiffdec: Add a malloc check and refactor another.
2012-04-13 09:49:13 -07:00
Alex Converse
99a335299f
faxcompr: Check malloc results and unify return path
2012-04-13 09:49:13 -07:00
Alex Converse
2b8374e920
ffv1: Fix size mismatch in encode_line.
2012-04-12 18:34:45 -07:00
Alex Converse
73b7437f1d
movenc: Remove a dead initialization
2012-04-12 18:34:45 -07:00
Alex Converse
e1ce756844
avplay: Don't free video filters string until the end of decoding.
...
av_freep()ing inside configure_video_filters() leaves a dangling
reference in the calling code, and the filter string is needed again when
reconfiguring video filters for a size change.
2012-04-11 10:24:01 -07:00
Alex Converse
c9024a9fd7
mpegts: Fix dead error checks
2012-03-26 17:53:51 -07:00
Alex Converse
b00307ecd0
aacsbr: Add a debug check to sbr_mapping.
...
There have been multiple bugs caused by inconsistencies here.
Based on an idea from Michael Niedermayer.
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Alex Converse
0cb93dacee
aac: Reset some state variables when turning SBR off
...
This makes sure the reset flag gets set when SBR gets turned back on
and sets control variables for unguided mode back to their defaults.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Alex Converse
a237b38021
aac: Reset PS parameters on header decode failure.
...
If the next header frame codes zero envelopes the previous frame's
values will be used. Consequently the invalid values must be cleared.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-23 14:56:44 -07:00
Alex Converse
5023b89bba
xwma: Validate channels and bits_per_coded_sample.
...
This prevents a SIGFPE later on.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 13:57:12 -07:00
Alex Converse
86f2ae06b9
mov: Do not read past the end of the ctts_data table.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-22 13:57:12 -07:00
Alex Converse
3e6e89b3d6
mov: Add missing terminator to mov_ch_layout_map_1ch.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: Libav-stable@libav.org
2012-03-22 13:56:44 -07:00
Alex Converse
100c3fb2d1
mpegts: Always honor a registration descriptor if present and there is no other codec information.
2012-03-09 09:48:14 -08:00
Alex Converse
fd0be63049
tiffdec: Prevent illegal memory access caused by recycled pointers.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-07 15:40:42 -08:00
Alex Converse
3574a85ce5
Replace computations of remaining bits with calls to get_bits_left().
2012-03-05 11:22:11 -08:00
Alex Converse
b70feb4053
amrnb/amrwb: Remove get_bits usage.
...
It is used to parse fixed sized fields out of a single octet. The code
is simpler without it.
2012-03-05 11:22:11 -08:00
Alex Converse
1aa708988a
mpegts: Pad the packet buffer in handle_packet().
...
This allows it to be used with get_bits without the thread of overreads.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 15:44:42 -08:00
Alex Converse
4df369692e
mpegts: Do not call read_sl_header() when no bytes remain in the buffer.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 15:44:42 -08:00
Alex Converse
9243ec4a50
rv10/20: Fix slice overflow with checked bitstream reader.
2012-03-02 09:31:32 -08:00
Alex Converse
2f6528537f
rv10/20: Fix a buffer overread caused by losing track of the remaining buffer size.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-03-02 09:31:32 -08:00
Alex Converse
1697c29d75
rmdec: Honor .RMF tag size rather than assuming 18.
2012-03-02 09:31:32 -08:00
Alex Converse
2564f6e6d4
aacdec: Reshuffle functions so get_che() can call set_default_channel_config() and output_configure().
2012-02-28 21:38:15 -08:00
Alex Converse
bbeb29133b
adpcm: Clip step_index values read from the bitstream at the beginning of each frame.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-28 12:11:06 -08:00
Alex Converse
5e239c7f9e
aacdec: Remove erroneous reference to global gain from the out of bounds scalefactor error message.
2012-02-27 17:59:47 -08:00
Alex Converse
447363870f
tiff: Prevent overreads in the type_sizes array.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-23 16:23:51 -08:00
Alex Converse
e32548d133
tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned.
...
TIFF v6.0 (unimplemented) adds signed equivalents.
2012-02-23 16:23:51 -08:00
Alex Converse
1cd9a6154b
aac: fix infinite loop on end-of-frame with sequence of 1-bits.
...
Based-on-work-by: Ronald S. Bultje <rsbultje@gmail.com >
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-02-22 11:23:43 -08:00
Alex Converse
b142496c56
mov: Add more HDV and XDCAM FourCCs.
...
Reference: VLC
2012-02-22 11:23:43 -08:00
Alex Converse
0ad522afb3
mov: Add support for MPEG2 HDV 720p24 (hdv4)
2012-02-21 14:20:28 -08:00
Alex Converse
b0f29db5c2
Mark mutable static data const where appropriate.
2012-02-21 09:47:07 -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
Alex Converse
c1df37e59b
hls: Re-add legacy applehttp name to preserve interface compatibility.
2012-02-14 12:13:46 -08:00
Alex Converse
9e1db721c4
svq3: Prevent illegal reads while parsing extradata.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-10 09:57:39 -08:00
Alex Converse
81749f30cd
dv: Move tables from dvdata.h to dvdata.c
2012-02-09 19:16:15 -08:00
Alex Converse
8dbdc2d840
dv: Move a table used only by the demuxer out of a shared header.
2012-02-09 19:16:15 -08:00
Alex Converse
89c9a8d3fd
dv: Move functions used only by the encoder out of a shared header.
2012-02-09 19:16:15 -08:00
Alex Converse
3746072712
dv: Split dvdata.h into dvdata.h and dvquant.h
2012-02-09 19:16:15 -08:00
Alex Converse
0ab3687924
dv: Fix small overread in audio frequency table.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-09 19:16:15 -08:00
Alex Converse
7b05025856
aacdec: Unify preconfigured layout and PCE layout.
2012-02-09 13:33:07 -08:00
Alex Converse
f1ecd0802d
aacdec: Support native channel layout when requested.
2012-02-09 13:33:07 -08:00
Alex Converse
37bed6ff3f
aacdec: Try to sniff a reasonable channel layout for PCE based configurations.
...
This changes the output order of multichannel PCE based streams.
2012-02-09 13:33:06 -08:00
Alex Converse
314af0ff94
aacdec: Use correct speaker order for 7.1.
...
The spec says the following speaker mapping is default:
center front speaker
left, right center front speakers,
left, right outside front speakers,
left surround, right surround rear speakers,
front low frequency effects speaker
2012-02-08 09:56:37 -08:00
Alex Converse
8ece266213
aacdec: Remove incorrect comment.
...
It was only correct when element ids met very specific criteria.
2012-02-08 09:56:37 -08:00
Alex Converse
e600a1e44a
aacdec: Simplify output configuration.
2012-02-08 09:56:37 -08:00
Alex Converse
29a20ac4a1
movdec: Avoid av_malloc(0) in stss
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-02-03 10:44:04 -08:00
Alex Converse
2d1c0dea5f
dv: Fix small stack overread related to CVE-2011-3929 and CVE-2011-3936.
...
Found with asan.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Alex Converse <alex.converse@gmail.com >
2012-01-31 18:32:13 -08:00
Alex Converse
c0bc7bd1e7
swfdec: Simplify sample rate calculation.
2012-01-31 15:55:46 -08:00
Alex Converse
f372ce119b
mp3dec: Fix a heap-buffer-overflow
...
In some cases, what is left to read from ptr is smaller than EXTRABYTES.
Based on a patch by Thierry Foucu <tfoucu@gmail.com >.
Signed-off-by: Alex Converse <alex.converse@gmail.com >
2012-01-30 16:49:15 -08:00
Alex Converse
48f1e5212c
wmadec: Verify bitstream size makes sense before calling init_get_bits.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:54:24 -08:00
Alex Converse
ae35210a5d
kmvc: Log into a context at a log level constant.
2012-01-30 10:54:24 -08:00
Alex Converse
dfa37fe8a3
mpeg12: Pad framerate tab to 16 entries.
...
There are many places where we read an unchecked 4-bit index into it.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:19:01 -08:00
Alex Converse
386741f887
kmvc: Check palsize.
...
Fixes: CVE-2011-3952
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Based on fix by Michael Niedermayer
2012-01-30 10:16:17 -08:00
Alex Converse
c898431ca5
nsvdec: Propagate errors
...
Related to CVE-2011-3940.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:15:41 -08:00
Alex Converse
8fd8a48263
nsvdec: Be more careful with av_malloc().
...
Check results for av_malloc() and fix an overflow in one call.
Related to CVE-2011-3940.
Based in part on work from Michael Niedermayer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-30 10:15:19 -08:00
Alex Converse
7181c4edee
cosmetics: Remove extra newlines at EOF
2012-01-27 17:19:09 -08:00
Alex Converse
08628b6afb
Revert "sws/pixfmt/pixdesc: add support for yuva444p"
...
This reverts commit fc115c80b7 .
Tests are broken.
2012-01-26 18:06:57 -08:00
Alex Converse
b57d262412
mjpegbdec: Fix overflow in SOS.
...
Based in part by a fix from Michael Niedermayer <michaelni@gmx.at >
Fixes CVE-2011-3947
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
2012-01-26 15:47:36 -08:00
Alex Converse
9adf25c1cf
smacker: Sanity check huffman tables found in the headers.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-01-26 10:18:00 -08:00
Alex Converse
90c0c83e14
smacker: remove dead store
2012-01-26 10:17:04 -08:00
Alex Converse
dac56d9ce0
qdm2: Check data block size for bytes to bits overflow.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-01-26 10:17:04 -08:00
Alex Converse
d2ee8c1779
matroskadec: Pad AAC extradata.
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-01-25 14:46:06 -08:00
Alex Converse
d78bb1a4b2
wma: Clip WMA1 and WMA2 frame length to 11 bits.
...
The MDCT buffers in the decoder are only sized for up to 11 bits. The
reverse engineered documentation for WMA1/2 headers say that that for
all samplerates above 32kHz 11 bits are used. 12 and 13 bit support
were added for WMAPro. I was unable to make any Microsoft tools generate
a test file at a samplerate above 48kHz.
Discovered by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2012-01-25 12:31:37 -08:00
Alex Converse
efe68076da
aacenc: Fix identification padding when the bitstream is already aligned.
2012-01-24 12:55:21 -08:00
Alex Converse
d7420e0ac9
mov: Remove dead stores for spherical coordinates for channel position.
2012-01-18 10:54:25 -08:00
Alex Converse
4df30f7114
utils: Check for extradata size overflows.
2012-01-12 13:26:13 -08:00
Alex Converse
b5fc571e4f
latmdec: Check AudioSpecificConfig length before decoding extradata.
...
This is different than a normal get_bits() over read because
decode_audio_specific_config() creates its own GetBitContext.
Fixes Bug 170.
2012-01-11 14:40:47 -08:00
Alex Converse
17ce52912f
aacsbr: prevent out of bounds memcpy().
...
Fixes Libav Bug 195.
This doesn't make the code handle sample rate or upsample/downsample
change properly but this is still a good sanity check.
Based on change by Michael Niedermayer.
Signed-off-by: Alex Converse <alex.converse@gmail.com >
2012-01-10 13:13:34 -08:00
Alex Converse
9de3cbc182
aacps: Add missing newline in error message.
2012-01-09 11:06:14 -08:00
Alex Converse
cd6e34d369
fate: Add tests for vc1/wmapro in ism.
2012-01-09 11:04:17 -08:00
Alex Converse
46ef355c65
aacdec: Add a fate test for 5.1 channel SBR.
2012-01-09 11:04:05 -08:00
Alex Converse
4acd43a295
aacdec: Turn off PS for multichannel files that use PCE based configs.
...
Fixes al_sbr_cm_48_5.1.mp4.
2012-01-09 11:04:05 -08:00
Alex Converse
ce23b2af18
fate: Add missing reference file from 9b4767e4.
2012-01-05 11:14:23 -08:00
Alex Converse
4274e481c0
mov: Support MOV_CH_LAYOUT_USE_DESCRIPTIONS for labeled descriptions.
2012-01-05 10:34:06 -08:00
Alex Converse
4bf3c8f226
mov: Don't stick the QuickTime field ordering atom in extradata.
...
The 'fiel' atoms can be found in H.264 tracks clobbering the extradata.
MJPEG supports non field based extradata, and this data should be
preserved when copying.
2011-12-21 22:04:37 -08:00
Alex Converse
021914e27f
aacdec: Cleanup decode_ics_info.
...
Remove unused function argument.
Return an AVERROR.
Don't zero out ICS on failure.
2011-12-20 18:32:41 -08:00
Alex Converse
41bdd4adc4
mpegts: Suppress invalid timebase warnings on DMB streams.
...
timestamp_len and timestamp_res intialize to zero.
2011-12-20 09:52:05 -08:00
Alex Converse
d9b89b23df
mpegts: Fix typo in handling sections in the PMT.
...
This was an error rebasing 4682a1dc3a for
commit. The "pes" variable guaranteed to be NULL in that block.
2011-12-20 09:52:04 -08:00
Alex Converse
d3b8bde2f1
movenc: Rudimentary IODs support.
2011-12-15 14:06:13 -08:00
Alex Converse
5cd56e193f
aacdec: Use intfloat.h rather than local punning union.
2011-12-12 21:36:54 -08:00
Alex Converse
52401b82bd
mov: Don't av_malloc(0).
...
malloc() is allowed to return NULL when zero is the argument. This
causes us to think malloc has failed and return AVERROR(ENOMEM). In
addition OS X malloc() returns an unfreeable non-NULL pointer for size
zero when alignment is greater than 16.
2011-12-05 09:51:35 -08:00
Alex Converse
6d23d19729
mov: Allow empty stts atom.
...
Fixes regressions caused by 30c3d976
2011-12-04 15:20:48 -08:00
Alex Converse
fdab793a46
avconv: Handle audio sync for non-S16 sample formats.
...
Also fix reporting of the number of samples added/dropped.
2011-11-28 22:18:09 -08:00
Alex Converse
ac47e014bb
adtsenc: Check frame size.
...
Inspired by work from: Michael Niedermayer <michaelni@gmx.at >.
Signed-off-by: Alex Converse <alex.converse@gmail.com >
2011-11-28 11:22:40 -08:00
Alex Converse
a27805189b
txd: Fix order of operations.
2011-11-28 11:22:36 -08:00
Alex Converse
2b45222b6a
md5proto: Fix order of operations.
2011-11-27 16:16:44 -08:00
Alex Converse
999e7ebd23
dca: Replace oversized unused get_bits() with skip_bits_long().
2011-11-27 15:57:38 -08:00
Alex Converse
028a2375e2
mov: Make format string match variable type.
2011-11-26 19:41:54 -08:00