From: Yusuke Nakamura Date: Wed, 11 May 2011 20:28:27 +0000 (+0900) Subject: mov: Support edit list atom version 1. X-Git-Tag: n0.8~317^2~129 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5f0bb0baefd506d684adfa1ad4259c65973b455e;p=coroid%2Fffmpeg_saccubus.git mov: Support edit list atom version 1. Signed-off-by: Diego Biurrun --- diff --git a/libavformat/isom.h b/libavformat/isom.h index 48e0bcf9e..ef3fe1484 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -109,7 +109,7 @@ typedef struct MOVStreamContext { unsigned int keyframe_count; int *keyframes; int time_scale; - int time_offset; ///< time offset of the first edit list entry + int64_t time_offset; ///< time offset of the first edit list entry int current_sample; unsigned int bytes_per_frame; unsigned int samples_per_frame; diff --git a/libavformat/mov.c b/libavformat/mov.c index 90f583f81..cede1f751 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2163,13 +2163,13 @@ free_and_return: static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom) { MOVStreamContext *sc; - int i, edit_count; + int i, edit_count, version; if (c->fc->nb_streams < 1) return 0; sc = c->fc->streams[c->fc->nb_streams-1]->priv_data; - avio_r8(pb); /* version */ + version = avio_r8(pb); /* version */ avio_rb24(pb); /* flags */ edit_count = avio_rb32(pb); /* entries */ @@ -2177,9 +2177,15 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, MOVAtom atom) return -1; for(i=0; i= -1) { sc->time_offset = time != -1 ? time : -duration;