[MPlayer-cvslog] CVS: main/libmpdemux muxer.h, 1.18, 1.19 muxer_avi.c, 1.35, 1.36

Corey Hickey CVS syncmail at mplayerhq.hu
Sun Feb 19 10:34:39 CET 2006


CVS change done by Corey Hickey CVS

Update of /cvsroot/mplayer/main/libmpdemux
In directory mail:/var2/tmp/cvs-serv15247/libmpdemux

Modified Files:
	muxer.h muxer_avi.c 
Log Message:
dwStart support for mencoder.


Index: muxer.h
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- muxer.h	26 Jan 2006 19:32:07 -0000	1.18
+++ muxer.h	19 Feb 2006 09:34:37 -0000	1.19
@@ -59,6 +59,7 @@
   off_t movi_start;
   off_t movi_end;
   off_t file_end; // for MPEG it's system timestamp in 1/90000 s
+  float audio_delay_fix;
   // index:
   AVIINDEXENTRY *idx;
   int idx_pos;

Index: muxer_avi.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/muxer_avi.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -r1.35 -r1.36
--- muxer_avi.c	26 Jan 2006 19:32:07 -0000	1.35
+++ muxer_avi.c	19 Feb 2006 09:34:37 -0000	1.36
@@ -285,6 +285,19 @@
     mp_msg(MSGT_MUXER, MSGL_INFO, "ODML: vprp aspect is %d:%d.\n", aspect >> 16, aspect & 0xffff);
   }
 
+  /* deal with stream delays */
+  for (i = 0; muxer->streams[i] && i < MUXER_MAX_STREAMS; ++i) {
+      muxer_stream_t *s = muxer->streams[i];
+      if (s->type == MUXER_TYPE_AUDIO && muxer->audio_delay_fix > 0.0) {
+          s->h.dwStart = muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale;
+          mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingAudioDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate);
+      }
+      if (s->type == MUXER_TYPE_VIDEO && muxer->audio_delay_fix < 0.0) {
+          s->h.dwStart = -muxer->audio_delay_fix * s->h.dwRate/s->h.dwScale;
+          mp_msg(MSGT_MUXER, MSGL_INFO, MSGTR_SettingVideoDelay, (float)s->h.dwStart * s->h.dwScale/s->h.dwRate);
+      }
+  }
+  
   if (isodml) {
       unsigned int rifflen, movilen;
       int i;




More information about the MPlayer-cvslog mailing list