[vlc-commits] demux: ogg: fix oggds frame interpolation (fix #20503)

Francois Cartegnie git at videolan.org
Thu May 24 12:14:03 CEST 2018


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu May 24 11:51:06 2018 +0200| [e92c2deb6ac38adcab682d04465df9d269030d5c] | committer: Francois Cartegnie

demux: ogg: fix oggds frame interpolation (fix #20503)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e92c2deb6ac38adcab682d04465df9d269030d5c
---

 modules/demux/ogg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index f0c85cc677..7b03bd542d 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -1081,7 +1081,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
         {
             if( p_stream->i_previous_granulepos > 0 )
             {
-                p_stream->i_pcr = VLC_TS_0 + p_stream->i_previous_granulepos * CLOCK_FREQ / p_stream->f_rate;
+                p_stream->i_pcr = VLC_TS_0 + Oggseek_GranuleToAbsTimestamp( p_stream, ++p_stream->i_previous_granulepos, false );
                 p_stream->i_pcr += p_ogg->i_nzpcr_offset;
             }
             /* First frame in ogm can be -1 (0 0 -1 2 3 -1 5 ...) */



More information about the vlc-commits mailing list