aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2004-07-17 21:01:03 +0000
committerMichael Niedermayer <michaelni@gmx.at>2004-07-17 21:01:03 +0000
commit58e555d4baa43eb0ee60fe62650faed676fd823b (patch)
tree34d94cacd417439eb410892a7fbbe6d5e8b4f1cc
parent7c4a25c89fac8d6d604a6057075efb32267b1802 (diff)
downloadffmpeg-58e555d4baa43eb0ee60fe62650faed676fd823b.tar.gz
mov_read_elst fix, based upon a patch by (Sebastien Bechet <s.bechet at av7 dot net>)
Originally committed as revision 3327 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavformat/mov.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index c085088990..b4676df544 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1431,11 +1431,18 @@ static int mov_read_cmov(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
/* edit list atom */
static int mov_read_elst(MOVContext *c, ByteIOContext *pb, MOV_atom_t atom)
{
+ int i, edit_count;
print_atom("elst", atom);
get_byte(pb); /* version */
get_byte(pb); get_byte(pb); get_byte(pb); /* flags */
- c->streams[c->fc->nb_streams-1]->edit_count = get_be32(pb); /* entries */
+ edit_count= c->streams[c->fc->nb_streams-1]->edit_count = get_be32(pb); /* entries */
+
+ for(i=0; i<edit_count; i++){
+ get_be32(pb); /* Track duration */
+ get_be32(pb); /* Media time */
+ get_be32(pb); /* Media rate */
+ }
#ifdef DEBUG
av_log(NULL, AV_LOG_DEBUG, "track[%i].edit_count = %i\n", c->fc->nb_streams-1, c->streams[c->fc->nb_streams-1]->edit_count);
#endif
@@ -1452,7 +1459,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
{ MKTAG( 'd', 'p', 'n', 'd' ), mov_read_leaf },
{ MKTAG( 'd', 'r', 'e', 'f' ), mov_read_leaf },
{ MKTAG( 'e', 'd', 't', 's' ), mov_read_default },
-//{ MKTAG( 'e', 'l', 's', 't' ), mov_read_elst }, //broken, try some movs from http://videos.av7.net/
+{ MKTAG( 'e', 'l', 's', 't' ), mov_read_elst },
{ MKTAG( 'f', 'r', 'e', 'e' ), mov_read_leaf },
{ MKTAG( 'h', 'd', 'l', 'r' ), mov_read_hdlr },
{ MKTAG( 'h', 'i', 'n', 't' ), mov_read_leaf },