]> git.sesse.net Git - vlc/blobdiff - modules/demux/ogg.c
* modules/demux/ogg.c: bug fix when switching between vorbis channels.
[vlc] / modules / demux / ogg.c
index 903d94f02e7b3d828e40a383c845275e3b6df5ab..c762fa8964e7d9c35ac0c23c4283f4a34b4e2a3a 100644 (file)
@@ -2,7 +2,7 @@
  * ogg.c : ogg stream input module for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ogg.c,v 1.17 2002/12/20 15:18:56 sigmunau Exp $
+ * $Id: ogg.c,v 1.19 2003/01/29 12:59:23 gbazin Exp $
  *
  * Authors: Gildas Bazin <gbazin@netcourrier.com>
  * 
@@ -1128,8 +1128,8 @@ static int Activate( vlc_object_t * p_this )
         p_stream->p_es->i_stream_id = p_stream->p_es->i_id = i_stream;
         p_stream->p_es->i_fourcc = p_stream->i_fourcc;
         p_stream->p_es->i_cat = p_stream->i_cat;
-        p_stream->p_es->p_demux_data = p_stream->p_bih ?
-            (void *)p_stream->p_bih : (void *)p_stream->p_wf;
+        p_stream->p_es->p_waveformatex      = (void*)p_stream->p_wf;
+        p_stream->p_es->p_bitmapinfoheader  = (void*)p_stream->p_bih;
 #undef p_stream
     }
 
@@ -1392,7 +1392,8 @@ static int Demux( input_thread_t * p_input )
         if( p_stream->i_cat == SPU_ES )
             continue;
 
-        if( p_stream->i_interpolated_pcr < p_ogg->i_pcr )
+        if( p_stream->i_interpolated_pcr > 0
+            && p_stream->i_interpolated_pcr < p_ogg->i_pcr )
             p_ogg->i_pcr = p_stream->i_interpolated_pcr;
     }
 #undef p_stream