diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-06 19:26:17 +0000 |
---|---|---|
committer | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2006-08-06 19:26:17 +0000 |
commit | a6bc70e3cb53506fa72e27aa28a162ac70ec01b2 (patch) | |
tree | 348bf5454787bd540d1ced8e0e484e958a61f44b /libmpdemux/demux_mov.c | |
parent | 1de0c3327d10a43ff3532be7e92c3160c52d55c8 (diff) |
Support for version 1 (64 bit) mvhd and mdhd, taken from libavformat mov demuxer
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19349 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/demux_mov.c')
-rw-r--r-- | libmpdemux/demux_mov.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/libmpdemux/demux_mov.c b/libmpdemux/demux_mov.c index f3db4b1883..a204cea7f5 100644 --- a/libmpdemux/demux_mov.c +++ b/libmpdemux/demux_mov.c @@ -582,9 +582,13 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak } else { /* not in track */ switch(id) { case MOV_FOURCC('m','v','h','d'): { - stream_skip(demuxer->stream,12); + int version = stream_read_char(demuxer->stream); + stream_skip(demuxer->stream, (version == 1) ? 19 : 11); priv->timescale=stream_read_dword(demuxer->stream); - priv->duration=stream_read_dword(demuxer->stream); + if (version == 1) + priv->duration=stream_read_qword(demuxer->stream); + else + priv->duration=stream_read_dword(demuxer->stream); mp_msg(MSGT_DEMUX, MSGL_V,"MOV: %*sMovie header (%d bytes): tscale=%d dur=%d\n",level,"",(int)len, (int)priv->timescale,(int)priv->duration); break; @@ -1580,12 +1584,16 @@ static int lschunks_intrak(demuxer_t* demuxer, int level, unsigned int id, break; } case MOV_FOURCC('m','d','h','d'): { + int version = stream_read_char(demuxer->stream); mp_msg(MSGT_DEMUX, MSGL_V, "MOV: %*sMedia header!\n", level, ""); - stream_skip(demuxer->stream, 12); + stream_skip(demuxer->stream, (version == 1) ? 19 : 11); // read timescale trak->timescale = stream_read_dword(demuxer->stream); // read length - trak->length = stream_read_dword(demuxer->stream); + if (version == 1) + trak->length = stream_read_qword(demuxer->stream); + else + trak->length = stream_read_dword(demuxer->stream); break; } case MOV_FOURCC('h','d','l','r'): { |