changeset 3040:ca38ffc89883 libavformat

10l, forgot alaw/mulaw mono, use bits_per_sample in fact, it should correctly set by av_get_bits_per_sample if recognized
author bcoudurier
date Wed, 13 Feb 2008 13:11:10 +0000
parents 1135ef610233
children f68603a02de9
files mov.c
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Wed Feb 13 12:51:14 2008 +0000
+++ b/mov.c	Wed Feb 13 13:11:10 2008 +0000
@@ -1387,8 +1387,7 @@
                 stsc_index++;
             chunk_samples = sc->sample_to_chunk[stsc_index].count;
             /* get chunk size */
-            if (sc->sample_size > 1 ||
-                st->codec->codec_id == CODEC_ID_PCM_U8 || st->codec->codec_id == CODEC_ID_PCM_S8)
+            if (sc->sample_size > 1 || st->codec->bits_per_sample == 8)
                 chunk_size = chunk_samples * sc->sample_size;
             else if (sc->samples_per_frame > 0 &&
                      (chunk_samples * sc->bytes_per_frame % sc->samples_per_frame == 0)) {