[MPlayer-cvslog] r19175 - trunk/libmpdemux/demux_mov.c
atmos4
subversion at mplayerhq.hu
Mon Jul 24 00:34:02 CEST 2006
Author: atmos4
Date: Mon Jul 24 00:34:02 2006
New Revision: 19175
Modified:
trunk/libmpdemux/demux_mov.c
Log:
Add simple edit list support to mov demuxer, it supports delay of audio and video tracks at the beginning of the file. E.g. video starts at 0.0s audio at 4.0s. It uses mplayers a/v-delay to achieve sync so please use with -framedrop for fastest sync. More Details in my mail to dev-eng from 2006-07-22.
Modified: trunk/libmpdemux/demux_mov.c
==============================================================================
--- trunk/libmpdemux/demux_mov.c (original)
+++ trunk/libmpdemux/demux_mov.c Mon Jul 24 00:34:02 2006
@@ -622,6 +622,15 @@
sh_audio_t* sh=new_sh_audio(demuxer,priv->track_db);
sh->format=trak->fourcc;
+ // crude audio delay from editlist0 hack ::atm
+ if(trak->editlist_size>=1) {
+ if(trak->editlist[0].pos == -1) {
+ sh->stream_delay = (float)trak->editlist[0].dur/(float)priv->timescale;
+ mp_msg(MSGT_DEMUX,MSGL_V,"MOV: Initial Audio-Delay: %.3f sec\n", sh->stream_delay);
+ }
+ }
+
+
switch( sh->format ) {
case 0x726D6173: /* samr */
/* amr narrowband */
@@ -929,6 +938,15 @@
int depth;
sh->format=trak->fourcc;
+ // crude video delay from editlist0 hack ::atm
+ if(trak->editlist_size>=1) {
+ if(trak->editlist[0].pos == -1) {
+ sh->stream_delay = (float)trak->editlist[0].dur/(float)priv->timescale;
+ mp_msg(MSGT_DEMUX,MSGL_V,"MOV: Initial Video-Delay: %.3f sec\n", sh->stream_delay);
+ }
+ }
+
+
if (trak->stdata_len < 78) {
mp_msg(MSGT_DEMUXER, MSGL_WARN,
"MOV: Invalid (%d bytes instead of >= 78) video trak desc\n",
More information about the MPlayer-cvslog
mailing list