[vlc-commits] demux: ogg: fix PCR from opus granule.

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


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Jan  2 21:48:10 2014 +0100| [e39d1a58ff5541dfb2e891935d3548e0813518dd] | committer: Francois Cartegnie

demux: ogg: fix PCR from opus granule.

Can't use granule 0 as it means there's still no valid first sample
after processing packet.
Fix start gap on opus webradios.

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

 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 9c858c8..24c9b29 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -912,7 +912,7 @@ static void Ogg_UpdatePCR( demux_t *p_demux, logical_stream_t *p_stream,
             /* 1 frame per packet */
             p_stream->i_interpolated_pcr += (CLOCK_FREQ / p_stream->f_rate);
         else if( p_stream->fmt.i_codec == VLC_CODEC_OPUS &&
-                 p_stream->i_previous_granulepos >= 0 &&
+                 p_stream->i_previous_granulepos > 0 &&
                  ( duration =
                      Ogg_OpusPacketDuration( p_stream, p_oggpacket ) ) > 0 )
         {



More information about the vlc-commits mailing list