changeset 1232:3b4d01890ada libavformat

sample size is 1 if bits per sample is 8 and mono channel
author bcoudurier
date Thu, 03 Aug 2006 16:22:01 +0000
parents e713080a7880
children 99a34915d15a
files mov.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mov.c	Thu Aug 03 15:33:48 2006 +0000
+++ b/mov.c	Thu Aug 03 16:22:01 2006 +0000
@@ -1568,7 +1568,7 @@
                 stsc_index++;
             chunk_samples = sc->sample_to_chunk[stsc_index].count;
             /* get chunk size */
-            if (sc->sample_size > 1)
+            if (sc->sample_size > 1 || st->codec->bits_per_sample == 8)
                 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;