mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
sample size is 1 if bits per sample is 8 and mono channel
Originally committed as revision 5920 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7f624e80ef
commit
2965f17b4f
@ -1568,7 +1568,7 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
|
|||||||
stsc_index++;
|
stsc_index++;
|
||||||
chunk_samples = sc->sample_to_chunk[stsc_index].count;
|
chunk_samples = sc->sample_to_chunk[stsc_index].count;
|
||||||
/* get chunk size */
|
/* 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;
|
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))
|
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;
|
chunk_size = chunk_samples * sc->sample_size_v1.num / sc->sample_size_v1.den;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user