[MPlayer-cvslog] r34518 - trunk/libmpdemux/demux_ogg.c

reimar subversion at mplayerhq.hu
Thu Jan 5 16:48:37 CET 2012


Author: reimar
Date: Thu Jan  5 16:48:37 2012
New Revision: 34518

Log:
Use double also to calculate ogg subtitle pts.

Modified:
   trunk/libmpdemux/demux_ogg.c

Modified: trunk/libmpdemux/demux_ogg.c
==============================================================================
--- trunk/libmpdemux/demux_ogg.c	Thu Jan  5 16:46:48 2012	(r34517)
+++ trunk/libmpdemux/demux_ogg.c	Thu Jan  5 16:48:37 2012	(r34518)
@@ -202,12 +202,12 @@ static void demux_ogg_add_sub(ogg_stream
             duration  |= (unsigned char)packet[i];
         }
         if (hdrlen > 0 && duration > 0) {
-            float pts;
+            double pts;
 
             if (pack->granulepos == -1)
                 pack->granulepos = os->lastpos + os->lastsize;
-            pts    = (float)pack->granulepos / (float)os->samplerate;
-            endpts = 1.0 + pts + (float)duration / 1000.0;
+            pts    = (double)pack->granulepos / (double)os->samplerate;
+            endpts = 1.0 + pts + (double)duration / 1000.0;
         }
         sub_clear_text(&ogg_sub, MP_NOPTS_VALUE);
         sub_add_text(&ogg_sub, &packet[lcv], pack->bytes - lcv, endpts, 1);


More information about the MPlayer-cvslog mailing list