Commit Graph

44855 Commits

Author SHA1 Message Date
Thilo Borgmann 66197988b1 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>
2012-09-17 14:17:27 -04:00
Thilo Borgmann 97f0efbfb8 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>
2012-09-17 14:17:27 -04:00
Michael Niedermayer 5b051ec3bd 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>
2012-09-17 14:17:27 -04:00
Michael Niedermayer 23aae62c2c 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>
2012-09-17 14:17:26 -04:00
Michael Niedermayer 9853e41aa0 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>
2012-09-17 14:17:26 -04:00
Anton Khirnov e3496e5dbe 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.
2012-09-17 15:48:20 +02:00
Anton Khirnov 34ebbbfeec xsubenc: reindent 2012-09-17 15:48:20 +02:00
Anton Khirnov 466b39efaf lavc: replace AVCodecContext.encode with subtitle-specific callback
AVCodecContext.encode is currently used only for subtitles, encode2 is
used for audio and video.
2012-09-17 15:48:20 +02:00
Anton Khirnov 9f64c8219a lavc: add const to private codec class initialization.
Silences a warning about discarding const.
2012-09-17 15:48:20 +02:00
Anton Khirnov 58dee6e62d 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.
2012-09-17 15:48:20 +02:00
Clément Bœsch 049ce4facb 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>
2012-09-17 15:48:20 +02:00
Clément Bœsch ffdd2e9144 lavf/id3v2: do not export empty fields.
This also avoids a memleak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2012-09-17 15:48:20 +02:00
Anton Khirnov 4e48aa8656 buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame() 2012-09-17 15:48:20 +02:00
Mans Rullgard 1fce361d70 lavfi: replace empty input/output lists with null pointers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-17 14:35:06 +01:00
Michael Niedermayer 291b220377 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  avconv: flush filtered frames before reconfiguring filters
  mov: stsd entries must be at least 16 byte
  mov: detect EOF in mov_read_dref()
  file: return proper error on seek failures

Conflicts:
	libavformat/file.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-17 15:15:43 +02:00
Stefano Sabatini 1ad63ff14a fate: add av_small_strptime() test to fate-parseutils 2012-09-17 12:46:55 +02:00
Stefano Sabatini 85c93d90df lavu/parseutils: fix av_small_strptime() whitespace directive parsing
According to POSIX, strptime() should consume whitespaces in the date
string everytime a whitespace conversion specification is found in the
date format specification. Make av_small_strptime() conform with this
behavior.

In particular, should fix trac ticket #1739.
2012-09-17 12:45:56 +02:00
Janne Grunau 2f34021d57 avconv: flush filtered frames before reconfiguring filters
This prevents lost frames after a resolution change.
2012-09-17 10:49:27 +02:00
Michael Niedermayer 83438a0db3 Merge remote-tracking branch 'cus/stable'
* cus/stable:
  ffplay: dont wait 100ms if data is not yet ready

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-17 00:41:07 +02:00
Marton Balint d8f8e911bd ffplay: dont wait 100ms if data is not yet ready
Also signal the wait if audio buffer is empty. This fixes jerky audio with
realtime sources.

Signed-off-by: Marton Balint <cus@passwd.hu>
2012-09-16 19:07:28 +02:00
Michael Niedermayer a593f5bd9d arm/dca: Fix compilation of decode_blockcodes() with --enable-thumb
Fix Suggested-by: Reimar
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 19:06:11 +02:00
Clément Bœsch 094991eb69 lavf/oggdec: reword stream creation error message. 2012-09-16 18:28:52 +02:00
Clément Bœsch 23f6420026 lavf/oggdec: reindent and comment blocks. 2012-09-16 18:28:51 +02:00
Clément Bœsch a218c5ebd2 lavf/oggdec: make stream replacement less convoluted.
Also re-use the allocated buffer instead of re-allocating a new one.
2012-09-16 18:28:15 +02:00
Clément Bœsch e18ea76523 lavf/oggdec: more explicit zeroing of the new ogg stream. 2012-09-16 18:28:14 +02:00
Clément Bœsch 3a89553347 lavf/oggdec: rework allocations in ogg_new_streams(). 2012-09-16 18:27:58 +02:00
Michael Niedermayer a5ea623b36 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>
2012-09-16 16:53:06 +02:00
Clément Bœsch edca80387c lavf/oggdec: simplify destroying streams with chained audio streams.
nstreams is assumed to be 1 at that point, so the loop is pointless.
2012-09-16 16:52:06 +02:00
Clément Bœsch 277ddf127d lavf/oggdec: rename str to sid.
"str" is misleading here (it's often used for string). "sid" makes more
sense to identify a stream id.
2012-09-16 16:52:06 +02:00
Clément Bœsch e1ca1dd71b lavf/oggdec: remove a comment not matching anything. 2012-09-16 16:52:06 +02:00
Clément Bœsch bf8bfc6a11 lavf/oggdec: inline ogg_get_headers().
There is no point in a distant definition of a small function like this
used only once.

Additional spacing to distinguish better the block.
2012-09-16 16:52:06 +02:00
Carl Eugen Hoyos 6fa2532dd3 vda_h264.c: Change header inclusion order.
Fixes compilation with XCode 3.2.6.
Fixes ticket #1736.
2012-09-16 16:43:27 +02:00
Carl Eugen Hoyos 52ef5ca9bb Mentioning 8bps once in the FFmpeg documentation is sufficient. 2012-09-16 16:31:33 +02:00
Michael Niedermayer 9db67bedf0 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>
2012-09-16 16:31:03 +02:00
Luca Barbato 4ed5ac50d3 file: return proper error on seek failures 2012-09-16 15:37:14 +02:00
Michael Niedermayer e80cbdbc57 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mpegvideo: drop unnecessary arguments to hpel_motion()
  mpegvideo: drop 'inline' from some functions
  nellymoserdec: drop support for s16 output.
  bmpdec: only initialize palette for pal8.
  build: Properly remove object files while cleaning
  flacdsp: arm optimised lpc filter
  compat/vsnprintf: return number of bytes required on truncation.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 14:55:00 +02:00
Michael Niedermayer 744e4429cf mp3enc: merge mp2/mp3_write_trailer
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 14:37:50 +02:00
Michael Niedermayer 197bbcf44c mp3enc: move mp3_update_xing() down
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 14:31:58 +02:00
Michael Niedermayer f276a490f0 Merge commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b'
* commit '3f7fd59d151a2773f0e2e93e56b6b13ec6e5334b':
  avformat: fix typo in avformat_close_input
  mp3enc: write Xing TOC
  mp3enc: support MPEG-2 and MPEG-2.5 in Xing header.
  mp3enc: downgrade some errors in writing Xing frame to warnings
  lavf: flush the output AVIOContext in av_write_trailer().
  lavf: cosmetics, reformat av_write_trailer().
  avio: flush the internal buffer in avio_close()
  Enhance doc on asyncts audiofilter
  cmdutils: avoid setting data pointers to invalid values in alloc_buffer()
  libavcodec: remove av_destruct_packet_nofree()

Conflicts:
	libavcodec/avpacket.c
	libavformat/mp3enc.c
	libavformat/nutenc.c
	libavformat/utils.c
	libavformat/version.h
	tests/ref/lavf/voc
	tests/ref/lavf/voc_s16

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2012-09-16 14:24:11 +02:00
Mans Rullgard 2568646abb 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>
2012-09-16 11:18:21 +01:00
Mans Rullgard 66f5a6b419 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>
2012-09-16 11:18:21 +01:00
Anton Khirnov 66f52d0c3d 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.
2012-09-16 09:44:26 +02:00
Anton Khirnov 8b78c2969a 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
2012-09-16 09:43:17 +02:00
Clément Bœsch d214e5cfb4 lavc/ass_split: add ff_ prefix to ass_style_get(). 2012-09-16 03:05:01 +02:00
Clément Bœsch 74434d3bfe lavfi/ass: mark ass_libavfilter_log_level_map as static const. 2012-09-16 02:59:43 +02:00
Clément Bœsch ca81e3b6e7 lavf/mkv: prefix video stereo arrays with ff_. 2012-09-16 02:58:40 +02:00
Clément Bœsch 8b05220727 lavu/error: make error_entries static const. 2012-09-16 02:53:32 +02:00
Hendrik Leppkes e3a1eb9edf af_pan: Fix sscanf formats to work with buggy sscanf implementations
Some implementations of sscanf do not handle a space before a trailing %n
properly.

As an example, MSVC's does this for the second insatnce in this patch, for
an input of "0x3:c0=c1:c1=c0":
    1) Match the final "c0" or "c1".
    2) Realize it's at the end of the string.
    3) Check for %n.
    4) There is no %n, but a space instead.
    5) Leave 'len' unitilialized.

So, move it out of the sscanf format strings, and call skip_spaces instead.

This bug does not affect skip_spaces since %n is the first and only formatting
string.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-09-15 19:49:34 -04:00
Derek Buitenhuis d512e74dec bprint: Remove custom vsnprintf
A proper implementation was introduced in
ba53720280 for MSVC, and
MinGW already has vsnprintf.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2012-09-15 19:47:10 -04:00
Ronald S. Bultje 663c21d4ac compat/vsnprintf: return number of bytes required on truncation.
This conforms to C99, but requires Windows >= XP.
2012-09-15 19:46:54 -04:00