[vlc-devel] commit: Try to workaround serialno change in ogg web radio. (Laurent Aimar )
git version control
git at videolan.org
Fri May 8 00:28:26 CEST 2009
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu May 7 22:55:13 2009 +0200| [816e1cd33078a791c0c2ad901bd1a2366b74f142] | committer: Laurent Aimar
Try to workaround serialno change in ogg web radio.
At each serialno changes, the timestamp being non continuous, there
will be an annoying glitch...
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=816e1cd33078a791c0c2ad901bd1a2366b74f142
---
modules/demux/ogg.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/modules/demux/ogg.c b/modules/demux/ogg.c
index aa9f687..2580c6a 100644
--- a/modules/demux/ogg.c
+++ b/modules/demux/ogg.c
@@ -339,6 +339,18 @@ static int Demux( demux_t * p_demux )
/* if we've just pulled page, look for the right logical stream */
if( !p_sys->b_page_waiting )
{
+ if( p_sys->i_streams == 1 &&
+ ogg_page_serialno( &oggpage ) != p_stream->os.serialno )
+ {
+ msg_Err( p_demux, "Broken Ogg stream (serialno) mismatch" );
+ ogg_stream_reset_serialno( &p_stream->os, ogg_page_serialno( &oggpage ) );
+
+ p_stream->b_reinit = true;
+ p_stream->i_pcr = -1;
+ p_stream->i_interpolated_pcr = -1;
+ es_out_Control( p_demux->out, ES_OUT_RESET_PCR );
+ }
+
if( ogg_stream_pagein( &p_stream->os, &oggpage ) != 0 )
continue;
}
More information about the vlc-devel
mailing list