Mercurial > mplayer.hg
changeset 34430:7a902ef36e45
Use double also to calculate ogg subtitle pts.
author | reimar |
---|---|
date | Thu, 05 Jan 2012 15:48:37 +0000 |
parents | 9becec2ec9bc |
children | 13df2e44dd58 |
files | libmpdemux/demux_ogg.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);