# HG changeset patch # User reimar # Date 1325778517 0 # Node ID 7a902ef36e4567dac7a77b2937dfaac1c2a09742 # Parent 9becec2ec9bc09fa04274362d5cfdac8263da8cf Use double also to calculate ogg subtitle pts. diff -r 9becec2ec9bc -r 7a902ef36e45 libmpdemux/demux_ogg.c --- a/libmpdemux/demux_ogg.c Thu Jan 05 15:46:48 2012 +0000 +++ b/libmpdemux/demux_ogg.c Thu Jan 05 15:48:37 2012 +0000 @@ -202,12 +202,12 @@ 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);