[vlc-commits] demux: oggseek: fix timestamp computation for opus

Francois Cartegnie git at videolan.org
Thu Jan 16 19:35:41 CET 2014


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Fri Jan  3 15:24:14 2014 +0100| [9fc1397ac49186237ea24991326206015bf4d32d] | committer: Francois Cartegnie

demux: oggseek: fix timestamp computation for opus

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

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

diff --git a/modules/demux/oggseek.c b/modules/demux/oggseek.c
index 10638d2..91c24e4 100644
--- a/modules/demux/oggseek.c
+++ b/modules/demux/oggseek.c
@@ -804,7 +804,7 @@ int64_t Oggseek_GranuleToAbsTimestamp( logical_stream_t *p_stream,
     }
     else if( p_stream->fmt.i_codec == VLC_CODEC_OPUS )
     {
-        i_timestamp = p_stream->i_pre_skip + i_granule * CLOCK_FREQ / 48000;
+        i_timestamp = ( i_granule - p_stream->i_pre_skip ) * CLOCK_FREQ / 48000;
     }
     else if( p_stream->fmt.i_codec == VLC_CODEC_VORBIS )
     {



More information about the vlc-commits mailing list