aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2008-03-03 01:27:15 +0000
committerMichael Niedermayer <michaelni@gmx.at>2008-03-03 01:27:15 +0000
commit78db672caeccd5e0af919ad188fbbae37c690624 (patch)
tree82ac5b875404e0a291a0a9b357b2759461264031 /libavformat/avidec.c
parent143b082044d8435d8cc9c32691fb98a6ae14977a (diff)
downloadffmpeg-78db672caeccd5e0af919ad188fbbae37c690624.tar.gz
Use block_align as the avi spec says.
fix issue274 Originally committed as revision 12296 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index 82acc2a7c1..7634a95e9d 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -488,8 +488,10 @@ static int avi_read_header(AVFormatContext *s, AVFormatParameters *ap)
break;
case CODEC_TYPE_AUDIO:
get_wav_header(pb, st->codec, size);
- if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align)
+ if(ast->sample_size && st->codec->block_align && ast->sample_size != st->codec->block_align){
av_log(s, AV_LOG_WARNING, "sample size (%d) != block align (%d)\n", ast->sample_size, st->codec->block_align);
+ ast->sample_size= st->codec->block_align;
+ }
if (size%2) /* 2-aligned (fix for Stargate SG-1 - 3x18 - Shades of Grey.avi) */
url_fskip(pb, 1);
/* Force parsing as several audio frames can be in