]> git.sesse.net Git - vlc/commitdiff
* modules/demux/livedotcom.cpp: fixed segfaults.
authorGildas Bazin <gbazin@videolan.org>
Mon, 29 Aug 2005 16:27:53 +0000 (16:27 +0000)
committerGildas Bazin <gbazin@videolan.org>
Mon, 29 Aug 2005 16:27:53 +0000 (16:27 +0000)
modules/demux/livedotcom.cpp

index 07ace4368dcd8fa87d1f9c42e9a932cd3b39dfe9..cbad733e78e2f64ee75ecb93a84660710901a970 100644 (file)
@@ -425,7 +425,7 @@ static int  Open ( vlc_object_t *p_this )
         {
             es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('u','n','d','f') );
             tk->fmt.audio.i_channels = sub->numChannels();
-            tk->fmt.audio.i_rate = sub->rtpSource()->timestampFrequency();
+            tk->fmt.audio.i_rate = sub->rtpTimestampFrequency();
 
             if( !strcmp( sub->codecName(), "MPA" ) ||
                 !strcmp( sub->codecName(), "MPA-ROBUST" ) ||
@@ -457,6 +457,14 @@ static int  Open ( vlc_object_t *p_this )
             {
                 tk->fmt.i_codec = VLC_FOURCC( 'a', 'l', 'a', 'w' );
             }
+            else if( !strcmp( sub->codecName(), "AMR" ) )
+            {
+                tk->fmt.i_codec = VLC_FOURCC( 's', 'a', 'm', 'r' );
+            }
+            else if( !strcmp( sub->codecName(), "AMR-WB" ) )
+            {
+                tk->fmt.i_codec = VLC_FOURCC( 's', 'a', 'w', 'b' );
+            }
             else if( !strcmp( sub->codecName(), "MP4A-LATM" ) )
             {
                 unsigned int i_extra;
@@ -778,7 +786,7 @@ static int Demux( demux_t *p_demux )
         live_track_t *tk = p_sys->track[i];
 
         if( !tk->b_muxed && !tk->b_rtcp_sync &&
-            tk->rtpSource->hasBeenSynchronizedUsingRTCP() )
+            tk->rtpSource && tk->rtpSource->hasBeenSynchronizedUsingRTCP() )
         {
             msg_Dbg( p_demux, "tk->rtpSource->hasBeenSynchronizedUsingRTCP()" );