Commit 82fe4072 authored by Michael Niedermayer's avatar Michael Niedermayer

Revert "avformat/mov: Bypass av_add_index_entry()"

Next commit will revert the PTS seeking so this is not needed anymore

This reverts commit 38e641a0.
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent f2e01b69
......@@ -3218,12 +3218,11 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
MOV_FRAG_SAMPLE_FLAG_DEPENDS_YES));
if (keyframe)
distance = 0;
err = av_add_index_entry(st, offset, INT64_MAX/2, sample_size, distance,
err = av_add_index_entry(st, offset, cts, sample_size, distance,
keyframe ? AVINDEX_KEYFRAME : 0);
if (err < 0) {
av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n");
} else
st->index_entries[st->nb_index_entries - 1].timestamp = cts;
}
av_dlog(c->fc, "AVIndex stream %d, sample %d, offset %"PRIx64", cts %"PRId64", "
"size %d, distance %d, keyframe %d\n", st->index, sc->sample_count+i,
offset, cts, sample_size, distance, keyframe);
......
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