changeset 3234:d1e891c1e548

dusplay sub_delay patch by Evgeny Chukreev <codedj@echo.ru>
author arpi
date Fri, 30 Nov 2001 23:44:04 +0000
parents 5a8d7b6920d6
children 0cf593b6bab0
files mplayer.c
diffstat 1 files changed, 8 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Fri Nov 30 23:13:05 2001 +0000
+++ b/mplayer.c	Fri Nov 30 23:44:04 2001 +0000
@@ -419,6 +419,7 @@
 int osd_visible=100;
 int osd_function=OSD_PLAY;
 int osd_last_pts=-303;
+int osd_show_sub_delay = 0;
 
 int v_bright=50;
 int v_cont=50;
@@ -1757,9 +1758,11 @@
       break;
     case 'z':
       sub_delay -= 0.1;
+      osd_show_sub_delay = 9; // show the subdelay in OSD
       break;
     case 'x':
       sub_delay += 0.1;
+      osd_show_sub_delay = 9; // show the subdelay in OSD
       break;
     case '9':
     case '0':
@@ -2026,7 +2029,11 @@
       int pts=d_video->pts;
       if(pts==osd_last_pts-1) ++pts; else osd_last_pts=pts;
       vo_osd_text=osd_text_buffer;
-      sprintf(vo_osd_text,"%c %02d:%02d:%02d",osd_function,pts/3600,(pts/60)%60,pts%60);
+      if (osd_show_sub_delay) {
+	  sprintf(vo_osd_text, "Sub delay: %d ms",(int)(sub_delay*1000));
+	  osd_show_sub_delay--;
+      } else
+          sprintf(vo_osd_text,"%c %02d:%02d:%02d",osd_function,pts/3600,(pts/60)%60,pts%60);
   } else {
       vo_osd_text=NULL;
   }