Commit 239fdc43 authored by bcoudurier's avatar bcoudurier

sample size to 1 might happen for data, fix GMCMidiaASX.mov, fallback is better than failing

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@12547 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7f40c749
...@@ -1183,12 +1183,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st) ...@@ -1183,12 +1183,8 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
frames = chunk_samples / sc->samples_per_frame; frames = chunk_samples / sc->samples_per_frame;
chunk_samples = sc->samples_per_frame; chunk_samples = sc->samples_per_frame;
} }
} else if (sc->sample_size > 1 || st->codec->bits_per_sample == 8) { } else
chunk_size = chunk_samples * sc->sample_size; chunk_size = chunk_samples * sc->sample_size;
} else {
av_log(mov->fc, AV_LOG_ERROR, "could not determine chunk size, report problem\n");
goto out;
}
for (j = 0; j < frames; j++) { for (j = 0; j < frames; j++) {
av_add_index_entry(st, current_offset, current_dts, chunk_size, 0, AVINDEX_KEYFRAME); av_add_index_entry(st, current_offset, current_dts, chunk_size, 0, AVINDEX_KEYFRAME);
/* get chunk duration */ /* get chunk duration */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment