[MPlayer-cvslog] CVS: main/libao2 ao_pcm.c,1.28,1.29
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Wed Jan 19 18:18:27 CET 2005
- Previous message: [MPlayer-cvslog] CVS: main/libvo vo_jpeg.c, 1.24, 1.25 vo_md5sum.c, 1.2, 1.3 vo_pnm.c, 1.3, 1.4 vo_yuv4mpeg.c, 1.20, 1.21
- Next message: [MPlayer-cvslog] CVS: main cfg-common.h,1.137,1.138
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libao2
In directory mail:/var2/tmp/cvs-serv1274
Modified Files:
ao_pcm.c
Log Message:
use MSTRZ suboption type
Index: ao_pcm.c
===================================================================
RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- ao_pcm.c 3 Jan 2005 14:16:06 -0000 1.28
+++ ao_pcm.c 19 Jan 2005 17:18:25 -0000 1.29
@@ -80,27 +80,18 @@
// return: 1=success 0=fail
static int init(int rate,int channels,int format,int flags){
int bits;
- strarg_t file;
opt_t subopts[] = {
{"waveheader", OPT_ARG_BOOL, &ao_pcm_waveheader, NULL},
- {"file", OPT_ARG_STR, &file, NULL},
+ {"file", OPT_ARG_MSTRZ, &ao_outputfilename, NULL},
{NULL}
};
// set defaults
ao_pcm_waveheader = 1;
- file.str = NULL;
- file.len = 0;
+ ao_outputfilename =
+ strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm");
if (subopt_parse(ao_subdevice, subopts) != 0) {
return 0;
}
- if (file.len > 0) {
- ao_outputfilename = malloc(file.len + 1);
- memcpy(ao_outputfilename, file.str, file.len);
- ao_outputfilename[file.len] = 0;
- }
- else
- ao_outputfilename =
- strdup((ao_pcm_waveheader)?"audiodump.wav":"audiodump.pcm");
/* bits is only equal to format if (format == 8) or (format == 16);
this means that the following "if" is a kludge and should
- Previous message: [MPlayer-cvslog] CVS: main/libvo vo_jpeg.c, 1.24, 1.25 vo_md5sum.c, 1.2, 1.3 vo_pnm.c, 1.3, 1.4 vo_yuv4mpeg.c, 1.20, 1.21
- Next message: [MPlayer-cvslog] CVS: main cfg-common.h,1.137,1.138
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list