summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-03-02 20:43:32 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-03-02 20:46:17 +0100
commit82fe4072ea4251d47167017b3223928279a5abab (patch)
tree47077bcb0ace150e5e4af6048b216bb9a52766ae /libavformat/mov.c
parentf2e01b693fe45cebce9b8ec3bca7a29746f859be (diff)
Revert "avformat/mov: Bypass av_add_index_entry()"
Next commit will revert the PTS seeking so this is not needed anymore This reverts commit 38e641a060e0c00930851a8053ca96250b3ecccc. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 286f3681f6..33dbdea12c 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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);