1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

Only use chunk demuxing for old uncompressed audio mechanism specified by stts.

This will split amr/aac cbr samples correctly in isom files which do not
set audio cid to -2.

Originally committed as revision 12603 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Baptiste Coudurier 2008-03-27 12:35:22 +00:00
parent e9c192562f
commit d3bc61ac75

View File

@ -1120,8 +1120,9 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
unsigned int stss_index = 0;
unsigned int i, j;
if (sc->sample_sizes || st->codec->codec_type == CODEC_TYPE_VIDEO ||
sc->audio_cid == -2) {
/* only use old uncompressed audio chunk demuxing when stts specifies it */
if (!(st->codec->codec_type == CODEC_TYPE_AUDIO &&
sc->stts_count == 1 && sc->stts_data[0].duration == 1)) {
unsigned int current_sample = 0;
unsigned int stts_sample = 0;
unsigned int keyframe, sample_size;