[Mplayer-cvslog] CVS: main/libaf af_delay.c,1.7,1.8
Arpi of Ize
arpi at mplayerhq.hu
Wed Dec 4 22:48:18 CET 2002
Update of /cvsroot/mplayer/main/libaf
In directory mail:/var/tmp.root/cvs-serv4473
Modified Files:
af_delay.c
Log Message:
the -af delay=[seconds] option currently parses floating point values of
"seconds" but uses only the integral part of it. This one-line patch
fixes that problem. It should be clear enough.
Linards Ticmanis <ticmanis at coli.uni-sb.de>
Index: af_delay.c
===================================================================
RCS file: /cvsroot/mplayer/main/libaf/af_delay.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- af_delay.c 12 Nov 2002 12:33:54 -0000 1.7
+++ af_delay.c 4 Dec 2002 21:48:15 -0000 1.8
@@ -50,7 +50,8 @@
// Set new len and allocate new buffer
s->tlen = *((float*)arg);
af->delay = s->tlen * 1000.0;
- s->len = af->data->rate*af->data->bps*af->data->nch*(int)s->tlen;
+// s->len = af->data->rate*af->data->bps*af->data->nch*(int)s->tlen;
+ s->len = ((int)(af->data->rate*s->tlen))*af->data->bps*af->data->nch;
s->buf = malloc(s->len);
af_msg(AF_MSG_DEBUG0,"[delay] Delaying audio output by %0.2fs\n",s->tlen);
af_msg(AF_MSG_DEBUG1,"[delay] Delaying audio output by %i bytes\n",s->len);
More information about the MPlayer-cvslog
mailing list