[MPlayer-dev-eng] [patch] fix for mplayer to display correctly the subtitles in frame based mpsub format

Rizsanyi Zsolt rizsanyi at myrealbox.com
Wed Apr 24 03:26:58 CEST 2002


This fixes what the subject says...

Index: subreader.c
===================================================================
RCS file: /cvsroot/mplayer/main/subreader.c,v
retrieving revision 1.55
diff -u -u -r1.55 subreader.c
--- subreader.c 27 Mar 2002 01:22:11 -0000      1.55
+++ subreader.c 24 Apr 2002 01:13:29 -0000
@@ -404,9 +404,15 @@
                if (!fgets(line, LINE_LEN, fd)) return NULL;
        } while (sscanf (line, "%f %f", &a, &b) !=2);
 
-       mpsub_position += (a*100.0);
+       if (sub_uses_time)
+           mpsub_position += (a*100.0);
+       else
+           mpsub_position += a;
        current->start=(int) mpsub_position;
-       mpsub_position += (b*100.0);
+       if (sub_uses_time)
+           mpsub_position += (b*100.0);
+       else
+           mpsub_position += b;
        current->end=(int) mpsub_position;
 
        while (num < SUB_MAX_TEXT) {



More information about the MPlayer-dev-eng mailing list