[MPlayer-dev-eng] [PATCH] fast -ao pcm hack

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Tue Apr 11 11:48:58 CEST 2006


Hi,
the attached patch adds a suboption to -ao pcm to allow faster dumping.
It is really hackish, but I think this is a really needed feature and I
did not find a better way...
(just removing the ao_data.pts < vo_pts check does not work, it will
abort with "too many video packets in the buffer").

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: libao2/ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.31
diff -u -r1.31 ao_pcm.c
--- libao2/ao_pcm.c	9 Feb 2006 14:07:54 -0000	1.31
+++ libao2/ao_pcm.c	25 Mar 2006 20:32:10 -0000
@@ -27,6 +27,7 @@
 
 static char *ao_outputfilename = NULL;
 static int ao_pcm_waveheader = 1;
+static int fast = 0;
 
 #define WAV_ID_RIFF 0x46464952 /* "RIFF" */
 #define WAV_ID_WAVE 0x45564157 /* "WAVE" */
@@ -83,6 +84,7 @@
 	opt_t subopts[] = {
 	  {"waveheader", OPT_ARG_BOOL, &ao_pcm_waveheader, NULL},
 	  {"file",       OPT_ARG_MSTRZ, &ao_outputfilename, NULL},
+	  {"fast",       OPT_ARG_BOOL, &fast, NULL},
 	  {NULL}
 	};
 	// set defaults
@@ -179,7 +181,7 @@
 static int get_space(void){
 
     if(vo_pts)
-      return ao_data.pts < vo_pts ? ao_data.outburst : 0;
+      return ao_data.pts < vo_pts + fast * 30000 ? ao_data.outburst : 0;
     return ao_data.outburst;
 }
 


More information about the MPlayer-dev-eng mailing list