diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-04-26 01:45:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-26 02:44:33 +0200 |
commit | 05815b3545c2f8718ab25f455d51ea88be43e9c5 (patch) | |
tree | 829f1d7637e540623da9e631498a321db82b2452 /libavcodec | |
parent | 7157334c375b7623dd52314d45cef3700896d0fe (diff) | |
download | ffmpeg-05815b3545c2f8718ab25f455d51ea88be43e9c5.tar.gz |
Fix issue1503, this fix may be incomplete we need more samples to know for sure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/wmadec.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index fa20bea1e0..3601e47af1 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -102,6 +102,13 @@ static int wma_decode_init(AVCodecContext * avctx) s->use_bit_reservoir = flags2 & 0x0002; s->use_variable_block_len = flags2 & 0x0004; + if(avctx->codec->id == CODEC_ID_WMAV2 && avctx->extradata_size >= 8){ + if(!AV_RL16(extradata+6) && s->use_variable_block_len){ + av_log(avctx, AV_LOG_WARNING, "Disabling use_variable_block_len, if this fails contact the ffmpeg developers and send us the file\n"); + s->use_variable_block_len= 0; // this fixes issue1503 + } + } + if(ff_wma_init(avctx, flags2)<0) return -1; |