diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-04-07 14:47:49 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-04-07 14:47:49 +0200 |
commit | a7908ac012ef60661765bda4550c02255d8265fd (patch) | |
tree | 269f0640cecee7df9893fa0a47613fc0a04ae45c | |
parent | 9285f25e31a73900148b6fe6643ed82b055619cb (diff) | |
parent | 9b79a05289d91d1184455d12e6c4df457f0657c4 (diff) | |
download | ffmpeg-a7908ac012ef60661765bda4550c02255d8265fd.tar.gz |
Merge commit '9b79a05289d91d1184455d12e6c4df457f0657c4' into release/0.10
* commit '9b79a05289d91d1184455d12e6c4df457f0657c4':
wmaprodec: return an error, not 0, when the input is too small.
vmdaudio: fix invalid reads when packet size is not a multiple of chunk size
vorbisdec: Error on bark_map_size equal to 0.
configure: clean up Altivec detection
Update RELEASE file for 0.8.6
update year to 2013
oggdec: make sure the private parse data is cleaned up (cherry picked from commit d894f74762bc95310ba23f804b7ba8dffc8f6646)
build: Fix CAF demuxer dependencies
doc: developer: Allow tabs in the vim configuration for Automake files
doc: filters: Correct BNF FILTER description
Conflicts:
RELEASE
cmdutils.c
libavcodec/vmdav.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | cmdutils.c | 2 | ||||
-rwxr-xr-x | configure | 11 | ||||
-rw-r--r-- | doc/developer.texi | 4 | ||||
-rw-r--r-- | doc/filters.texi | 2 | ||||
-rw-r--r-- | libavcodec/Makefile | 3 | ||||
-rw-r--r-- | libavcodec/vorbisdec.c | 5 | ||||
-rw-r--r-- | libavcodec/wmaprodec.c | 7 | ||||
-rw-r--r-- | libavformat/oggdec.c | 4 | ||||
-rw-r--r-- | libavformat/oggdec.h | 5 | ||||
-rw-r--r-- | libavformat/oggparsevorbis.c | 14 |
10 files changed, 42 insertions, 15 deletions
diff --git a/cmdutils.c b/cmdutils.c index f326b9c655..45820ed878 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -56,7 +56,7 @@ struct SwsContext *sws_opts; AVDictionary *format_opts, *codec_opts; -const int this_year = 2012; +const int this_year = 2013; static FILE *report_file; @@ -2900,17 +2900,14 @@ elif enabled ppc; then check_cc <<EOF || disable altivec $inc_altivec_h int main(void) { - vector signed int v1, v2, v3; - v1 = vec_add(v2,v3); + vector signed int v1 = (vector signed int) { 0 }; + vector signed int v2 = (vector signed int) { 1 }; + v1 = vec_add(v1, v2); return 0; } EOF - # check if our compiler supports braces for vector declarations - check_cc <<EOF || die "You need a compiler that supports {} in AltiVec vector declarations." -$inc_altivec_h -int main (void) { (vector int) {1}; return 0; } -EOF + enabled altivec || warn "Altivec disabled, possibly missing --cpu flag" fi elif enabled sparc; then diff --git a/doc/developer.texi b/doc/developer.texi index 32d666ac68..e0e332a6c2 100644 --- a/doc/developer.texi +++ b/doc/developer.texi @@ -187,8 +187,8 @@ the following snippet into your @file{.vimrc}: set expandtab set shiftwidth=4 set softtabstop=4 -" allow tabs in Makefiles -autocmd FileType make set noexpandtab shiftwidth=8 softtabstop=8 +" Allow tabs in Makefiles. +autocmd FileType make,automake set noexpandtab shiftwidth=8 softtabstop=8 " Trailing whitespace and tabs are forbidden, so highlight them. highlight ForbiddenWhitespace ctermbg=red guibg=red match ForbiddenWhitespace /\s\+$\|\t/ diff --git a/doc/filters.texi b/doc/filters.texi index 43eec40d16..ef10bcb9b2 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -82,7 +82,7 @@ Follows a BNF description for the filtergraph syntax: @var{LINKLABEL} ::= "[" @var{NAME} "]" @var{LINKLABELS} ::= @var{LINKLABEL} [@var{LINKLABELS}] @var{FILTER_ARGUMENTS} ::= sequence of chars (eventually quoted) -@var{FILTER} ::= [@var{LINKNAMES}] @var{NAME} ["=" @var{ARGUMENTS}] [@var{LINKNAMES}] +@var{FILTER} ::= [@var{LINKLABELS}] @var{NAME} ["=" @var{FILTER_ARGUMENTS}] [@var{LINKLABELS}] @var{FILTERCHAIN} ::= @var{FILTER} [,@var{FILTERCHAIN}] @var{FILTERGRAPH} ::= @var{FILTERCHAIN} [;@var{FILTERGRAPH}] @end example diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 972cc593cf..565387615a 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -578,7 +578,8 @@ OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o # libavformat dependencies OBJS-$(CONFIG_ADTS_MUXER) += mpeg4audio.o OBJS-$(CONFIG_ADX_DEMUXER) += adx.o -OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o +OBJS-$(CONFIG_CAF_DEMUXER) += mpeg4audio.o mpegaudiodata.o \ + ac3tab.o OBJS-$(CONFIG_DV_DEMUXER) += dvdata.o OBJS-$(CONFIG_DV_MUXER) += dvdata.o timecode.o OBJS-$(CONFIG_FLAC_DEMUXER) += flacdec.o flacdata.o flac.o vorbis_data.o diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index d16ae751c4..b9b1753893 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -599,6 +599,11 @@ static int vorbis_parse_setup_hdr_floors(vorbis_context *vc) floor_setup->data.t0.order = get_bits(gb, 8); floor_setup->data.t0.rate = get_bits(gb, 16); floor_setup->data.t0.bark_map_size = get_bits(gb, 16); + if (floor_setup->data.t0.bark_map_size == 0) { + av_log(vc->avccontext, AV_LOG_ERROR, + "Floor 0 bark map size is 0.\n"); + return AVERROR_INVALIDDATA; + } floor_setup->data.t0.amplitude_bits = get_bits(gb, 6); /* zero would result in a div by zero later * * 2^0 - 1 == 0 */ diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c index 975a4a19dd..775484cbc1 100644 --- a/libavcodec/wmaprodec.c +++ b/libavcodec/wmaprodec.c @@ -1507,8 +1507,11 @@ static int decode_packet(AVCodecContext *avctx, void *data, s->packet_done = 0; /** sanity check for the buffer length */ - if (buf_size < avctx->block_align) - return 0; + if (buf_size < avctx->block_align) { + av_log(avctx, AV_LOG_ERROR, "Input packet too small (%d < %d)\n", + buf_size, avctx->block_align); + return AVERROR_INVALIDDATA; + } s->next_packet_start = buf_size - avctx->block_align; buf_size = avctx->block_align; diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 0342747204..de239f308c 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -532,6 +532,10 @@ static int ogg_read_close(AVFormatContext *s) for (i = 0; i < ogg->nstreams; i++) { av_free(ogg->streams[i].buf); + if (ogg->streams[i].codec && + ogg->streams[i].codec->cleanup) { + ogg->streams[i].codec->cleanup(s, i); + } av_free(ogg->streams[i].private); } av_free(ogg->streams); diff --git a/libavformat/oggdec.h b/libavformat/oggdec.h index 7f5452f2b0..cbe29f2552 100644 --- a/libavformat/oggdec.h +++ b/libavformat/oggdec.h @@ -51,6 +51,11 @@ struct ogg_codec { * 0 if granule is the end time of the associated packet. */ int granule_is_start; + /** + * Number of expected headers + */ + int nb_header; + void (*cleanup)(AVFormatContext *s, int idx); }; struct ogg_stream { diff --git a/libavformat/oggparsevorbis.c b/libavformat/oggparsevorbis.c index ba9b348456..0c26684dd2 100644 --- a/libavformat/oggparsevorbis.c +++ b/libavformat/oggparsevorbis.c @@ -188,6 +188,16 @@ fixup_vorbis_headers(AVFormatContext * as, struct oggvorbis_private *priv, return offset; } +static int vorbis_cleanup(AVFormatContext *s, int idx) +{ + struct ogg *ogg = s->priv_data; + struct ogg_stream *os = ogg->streams + idx; + struct oggvorbis_private *priv = os->private; + int i; + if (os->private) + for (i = 0; i < 3; i++) + av_freep(&priv->packet[i]); +} static int vorbis_header (AVFormatContext * s, int idx) @@ -278,5 +288,7 @@ vorbis_header (AVFormatContext * s, int idx) const struct ogg_codec ff_vorbis_codec = { .magic = "\001vorbis", .magicsize = 7, - .header = vorbis_header + .header = vorbis_header, + .cleanup= vorbis_cleanup, + .nb_header = 3, }; |