[MPlayer-cvslog] CVS: main cfg-common.h, 1.154, 1.155 mencoder.c, 1.339, 1.340 mplayer.c, 1.909, 1.910

Corey Hickey CVS syncmail at mplayerhq.hu
Mon Feb 20 10:36:13 CET 2006


CVS change done by Corey Hickey CVS

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

Modified Files:
	cfg-common.h mencoder.c mplayer.c 
Log Message:
New option: -ignore-start

Makes mplayer and mencoder ignore dwStart in AVI files.


Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.154
retrieving revision 1.155
diff -u -r1.154 -r1.155
--- cfg-common.h	4 Feb 2006 00:08:54 -0000	1.154
+++ cfg-common.h	20 Feb 2006 09:36:09 -0000	1.155
@@ -150,6 +150,10 @@
 	// set a-v distance
 	{"delay", &audio_delay, CONF_TYPE_FLOAT, CONF_RANGE, -100.0, 100.0, NULL},
 
+	// ignore header-specified delay (dwStart)
+	{"ignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 0, 1, NULL},
+	{"noignore-start", &ignore_start, CONF_TYPE_FLAG, 0, 1, 0, NULL},
+
 #ifdef USE_LIBA52
         {"a52drc", &a52_drc_level, CONF_TYPE_FLOAT, CONF_RANGE, 0, 1, NULL},
 #endif

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.339
retrieving revision 1.340
diff -u -r1.339 -r1.340
--- mencoder.c	19 Feb 2006 09:34:36 -0000	1.339
+++ mencoder.c	20 Feb 2006 09:36:09 -0000	1.340
@@ -156,6 +156,7 @@
 static float audio_preload=0.5;
 static float audio_delay_fix=0.0;
 static float audio_delay=0.0;
+static int ignore_start=0;
 static int audio_density=2;
 
 float force_fps=0;
@@ -866,6 +867,7 @@
 	mux_v->bih->biCompression, (char *)&mux_v->bih->biCompression);
 }
 
+if (! ignore_start)
     muxer->audio_delay_fix -= sh_video->stream_delay;
 
 //if(demuxer->file_format!=DEMUXER_TYPE_AVI) pts_from_bps=0; // it must be 0 for mpeg/asf!
@@ -961,6 +963,7 @@
 
 if (verbose>1) print_wave_header(mux_a->wf);
 
+if (! ignore_start)
     muxer->audio_delay_fix += sh_audio->stream_delay;
 
 } // if(sh_audio)

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.909
retrieving revision 1.910
diff -u -r1.909 -r1.910
--- mplayer.c	18 Feb 2006 09:26:39 -0000	1.909
+++ mplayer.c	20 Feb 2006 09:36:09 -0000	1.910
@@ -294,6 +294,7 @@
 static float max_pts_correction=0;//default_max_pts_correction;
 static float c_total=0;
        float audio_delay=0;
+static int ignore_start=0;
 
 static int softsleep=0;
 
@@ -2524,9 +2525,11 @@
 
 if(sh_video){
   sh_video->timer=0;
+  if (! ignore_start)
     audio_delay += sh_video->stream_delay;
 }
 if(sh_audio){
+  if (! ignore_start)
     audio_delay -= sh_audio->stream_delay;
   sh_audio->delay=-audio_delay;
 }




More information about the MPlayer-cvslog mailing list