aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-08-24 18:39:57 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2006-08-24 18:39:57 +0000
commitc61900c6e9aac42856fda0e78ed5bd50dd286e01 (patch)
tree5fd7d616d9bfa567ab069c498c14ea3a155605a9 /libavformat
parentacf36dba185f6dd72709ba8984fe79ac3cd250bb (diff)
downloadffmpeg-c61900c6e9aac42856fda0e78ed5bd50dd286e01.tar.gz
fix mac3audio.mov, pcm_s8 and pcm_u8 can only have sample size of 1 and only if mono, dont rely on bits per sample which can be wrong
Originally committed as revision 6079 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mov.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index e234ef707d..30295d9e56 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1598,7 +1598,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
stsc_index++;
chunk_samples = sc->sample_to_chunk[stsc_index].count;
/* get chunk size */
- if (sc->sample_size > 1 || st->codec->bits_per_sample == 8)
+ if (sc->sample_size > 1 || st->codec->codec_id == CODEC_ID_PCM_U8 || st->codec->codec_id == CODEC_ID_PCM_S8)
chunk_size = chunk_samples * sc->sample_size;
else if (sc->sample_size_v1.den > 0 && (chunk_samples * sc->sample_size_v1.num % sc->sample_size_v1.den == 0))
chunk_size = chunk_samples * sc->sample_size_v1.num / sc->sample_size_v1.den;