comparison mov.c @ 3173:cb3eb255f80d libavformat

sample size to 1 might happen for data, fix GMCMidiaASX.mov, fallback is better than failing
author bcoudurier
date Fri, 21 Mar 2008 14:30:45 +0000
parents 3c56f53f437b
children 55ce214a13ea
comparison
equal deleted inserted replaced
3172:c806866fa0cc 3173:cb3eb255f80d
1181 else { 1181 else {
1182 chunk_size = sc->bytes_per_frame; 1182 chunk_size = sc->bytes_per_frame;
1183 frames = chunk_samples / sc->samples_per_frame; 1183 frames = chunk_samples / sc->samples_per_frame;
1184 chunk_samples = sc->samples_per_frame; 1184 chunk_samples = sc->samples_per_frame;
1185 } 1185 }
1186 } else if (sc->sample_size > 1 || st->codec->bits_per_sample == 8) { 1186 } else
1187 chunk_size = chunk_samples * sc->sample_size; 1187 chunk_size = chunk_samples * sc->sample_size;
1188 } else {
1189 av_log(mov->fc, AV_LOG_ERROR, "could not determine chunk size, report problem\n");
1190 goto out;
1191 }
1192 for (j = 0; j < frames; j++) { 1188 for (j = 0; j < frames; j++) {
1193 av_add_index_entry(st, current_offset, current_dts, chunk_size, 0, AVINDEX_KEYFRAME); 1189 av_add_index_entry(st, current_offset, current_dts, chunk_size, 0, AVINDEX_KEYFRAME);
1194 /* get chunk duration */ 1190 /* get chunk duration */
1195 chunk_duration = 0; 1191 chunk_duration = 0;
1196 while (chunk_samples > 0) { 1192 while (chunk_samples > 0) {