[Mplayer-cvslog] CVS: main/libaf af_export.c,1.2,1.3
Alex Beregszaszi
alex at mplayerhq.hu
Fri Nov 28 21:44:05 CET 2003
Update of /cvsroot/mplayer/main/libaf
In directory mail:/var/tmp.root/cvs-serv26053
Modified Files:
af_export.c
Log Message:
minor fixes by ed at catmur.co.uk
Index: af_export.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_export.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- af_export.c 21 Sep 2003 12:16:16 -0000 1.2
+++ af_export.c 28 Nov 2003 20:43:00 -0000 1.3
@@ -69,7 +69,7 @@
if(s->fd)
close(s->fd);
- // Accept only int16_t as input fomat (which sucks)
+ // Accept only int16_t as input format (which sucks)
af->data->rate = ((af_data_t*)arg)->rate;
af->data->nch = ((af_data_t*)arg)->nch;
af->data->format = AF_FORMAT_SI | AF_FORMAT_NE;
@@ -79,12 +79,12 @@
if(s->sz == 0)
s->sz = DEF_SZ;
- // Allocate new buffers (as one continous block)
- s->buf[0] = calloc(DEF_SZ*af->data->nch, af->data->bps);
+ // Allocate new buffers (as one continuous block)
+ s->buf[0] = calloc(s->sz*af->data->nch, af->data->bps);
if(NULL == s->buf[0])
af_msg(AF_MSG_FATAL, "[export] Out of memory\n");
for(i = 1; i < af->data->nch; i++)
- s->buf[i] = s->buf[0] + i*DEF_SZ*af->data->bps;
+ s->buf[i] = s->buf[0] + i*s->sz*af->data->bps;
// Init memory mapping
s->fd = open(s->filename, O_RDWR | O_CREAT | O_TRUNC, 0640);
@@ -139,7 +139,7 @@
memcpy(s->filename, str, i);
s->filename[i] = 0;
- sscanf(str + i, "%d", &(s->sz));
+ sscanf(str + i + 1, "%d", &(s->sz));
return af->control(af, AF_CONTROL_EXPORT_SZ | AF_CONTROL_SET, &s->sz);
}
More information about the MPlayer-cvslog
mailing list