[Mplayer-cvslog] CVS: main mplayer.c,1.632,1.633
Arpi of Ize
arpi at mplayerhq.hu
Sat Dec 28 14:53:35 CET 2002
- Previous message: [Mplayer-cvslog] CVS: main/DOCS cd-dvd.html,1.53,1.54
- Next message: [Mplayer-cvslog] CVS: main/libaf af_comp.c,NONE,1.1 af_gate.c,NONE,1.1 af_pan.c,NONE,1.1 af_resample.h,NONE,1.1 af_tools.c,NONE,1.1 Makefile,1.6,1.7 af.c,1.19,1.20 af.h,1.12,1.13 af_channels.c,1.8,1.9 af_delay.c,1.8,1.9 af_equalizer.c,1.2,1.3 af_format.c,1.9,1.10 af_resample.c,1.15,1.16 af_volume.c,1.5,1.6 control.h,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv12132
Modified Files:
mplayer.c
Log Message:
This patch makes subtitle and A-V delays display correctly rounded
("3800 ms" instead of "3799 ms" etc).
Oskar Liljeblad <oskar at osk.mine.nu>
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.632
retrieving revision 1.633
diff -u -r1.632 -r1.633
--- mplayer.c 28 Dec 2002 11:39:31 -0000 1.632
+++ mplayer.c 28 Dec 2002 13:53:31 -0000 1.633
@@ -80,6 +80,7 @@
static int quiet=0;
#define ABS(x) (((x)>=0)?(x):(-(x)))
+#define ROUND(x) ((int)((x)<0 ? (x)-0.5 : (x)+0.5))
#ifdef HAVE_RTC
#include <linux/rtc.h>
@@ -2925,7 +2926,7 @@
osd_show_vobsub_changed--;
} else
if (osd_show_sub_delay) {
- sprintf(osd_text_tmp, "Sub delay: %d ms",(int)(sub_delay*1000));
+ sprintf(osd_text_tmp, "Sub delay: %d ms %.10f", ROUND(sub_delay*1000));
osd_show_sub_delay--;
} else
if (osd_show_sub_pos) {
@@ -2939,7 +2940,7 @@
osd_show_sub_alignment--;
} else
if (osd_show_av_delay) {
- sprintf(osd_text_tmp, "A-V delay: %d ms",(int)(audio_delay*1000));
+ sprintf(osd_text_tmp, "A-V delay: %d ms", ROUND(audio_delay*1000));
osd_show_av_delay--;
} else if(osd_level>=2)
sprintf(osd_text_tmp,"%c %02d:%02d:%02d",osd_function,pts/3600,(pts/60)%60,pts%60);
- Previous message: [Mplayer-cvslog] CVS: main/DOCS cd-dvd.html,1.53,1.54
- Next message: [Mplayer-cvslog] CVS: main/libaf af_comp.c,NONE,1.1 af_gate.c,NONE,1.1 af_pan.c,NONE,1.1 af_resample.h,NONE,1.1 af_tools.c,NONE,1.1 Makefile,1.6,1.7 af.c,1.19,1.20 af.h,1.12,1.13 af_channels.c,1.8,1.9 af_delay.c,1.8,1.9 af_equalizer.c,1.2,1.3 af_format.c,1.9,1.10 af_resample.c,1.15,1.16 af_volume.c,1.5,1.6 control.h,1.3,1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list