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.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@19175 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
atmos4 2006-07-23 22:34:02 +00:00
parent ea0995d63d
commit 7d2486e71e
1 changed files with 18 additions and 0 deletions

View File

@ -622,6 +622,15 @@ static void lschunks(demuxer_t* demuxer,int level,off_t endpos,mov_track_t* trak
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 @@ quit_vorbis_block:
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",