]> git.sesse.net Git - vlc/commitdiff
-moved warning message to debug message in spdif pass-through plugin
authorStéphane Borel <stef@videolan.org>
Wed, 14 Nov 2001 03:38:11 +0000 (03:38 +0000)
committerStéphane Borel <stef@videolan.org>
Wed, 14 Nov 2001 03:38:11 +0000 (03:38 +0000)
-changed a bit the wait time. It works better here, please test (Bozo ? 0:-)

plugins/ac3_spdif/ac3_spdif.c
src/audio_output/aout_spdif.c

index 72a81daa723385ae9f2deb43749205fd597fba26..1e3044cb79b367c9e3d499d8bf420b6244d0c98a 100644 (file)
@@ -2,7 +2,7 @@
  * ac3_spdif.c: ac3 pass-through to external decoder with enabled soundcard
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: ac3_spdif.c,v 1.1 2001/11/13 12:09:17 henri Exp $
+ * $Id: ac3_spdif.c,v 1.2 2001/11/14 03:38:11 stef Exp $
  *
  * Authors: Stéphane Borel <stef@via.ecp.fr>
  *          Juha Yrjola <jyrjola@cc.hut.fi>
@@ -158,11 +158,12 @@ static int ac3_spdif_Run( decoder_config_t * p_config )
         /* Handle the dates */
         if( p_spdif->i_real_pts )
         {
-            if(i_current_pts + i_frame_time != p_spdif->i_real_pts)
+            mtime_t     i_delta = p_spdif->i_real_pts - i_current_pts -
+                                  i_frame_time;
+            if( i_delta > i_frame_time || i_delta < -i_frame_time )
             {
-                intf_WarnMsg( 2, "spdif warning: date discontinuity (%d)",
-                              p_spdif->i_real_pts - i_current_pts -
-                              i_frame_time );
+                intf_WarnMsg( 3, "spdif warning: date discontinuity (%d)",
+                              i_delta );
             }
             i_current_pts = p_spdif->i_real_pts;
             p_spdif->i_real_pts = 0;
index ad0e3c535f5604a75d65fd088a2054777dae9489..6590598d15b9444d3ea3be234d53701ce134ae4d 100644 (file)
@@ -2,7 +2,7 @@
  * aout_spdif: ac3 passthrough output
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: aout_spdif.c,v 1.17 2001/10/13 15:34:21 stef Exp $
+ * $Id: aout_spdif.c,v 1.18 2001/11/14 03:38:11 stef Exp $
  *
  * Authors: Michel Kaempf <maxx@via.ecp.fr>
  *          Stéphane Borel <stef@via.ecp.fr>
@@ -41,8 +41,6 @@
 #include "audio_output.h"
 #include "aout_common.h"
 
-#define FRAME_TIME      32000
-
 /*****************************************************************************
  * aout_SpdifThread: audio output thread that sends raw spdif data
  *                   to an external decoder
@@ -61,7 +59,7 @@ void aout_SpdifThread( aout_thread_t * p_aout )
   mtime_t     m_old = 0;
 
 
-  intf_WarnMsg( 3, "aout info: starting spdif output loop" );
+  intf_DbgMsg( "aout debug: starting spdif output loop" );
 
   while( !p_aout->b_die )
   {
@@ -112,13 +110,13 @@ void aout_SpdifThread( aout_thread_t * p_aout )
             /* check continuity */
             if( (m_play - m_old) != m_frame_time )
             {
-              intf_WarnMsg( 6, "aout warning: long frame ? (%lld)",
+              intf_DbgMsg( "aout debug: malformed frame ? (%lld)",
                                m_play - m_old );
-              mwait( m_play );
+              mwait( m_play - m_frame_time );
             }
             else
             {
-              mwait( m_play - 3* m_frame_time );
+              mwait( m_play - * m_frame_time );
             }
             m_old = m_play;
 
@@ -128,20 +126,20 @@ void aout_SpdifThread( aout_thread_t * p_aout )
           }
           else
           {
-            intf_WarnMsg( 6, "aout info: late spdif frame" );
+            intf_DbgMsg( "aout debug: late spdif frame" );
           }
         }
         else
         {
           vlc_mutex_unlock( &p_aout->fifo[i_fifo].data_lock );
           msleep( m_frame_time );
-          intf_WarnMsg( 6, "aout info: empty spdif fifo" );
+          intf_WarnMsg( 3, "aout warning: empty spdif fifo" );
         }
       }
     }
   }
 
-  intf_WarnMsg( 3, "aout info: exiting spdif loop" );
+  intf_DbgMsg( "aout debug: exiting spdif loop" );
   vlc_mutex_lock( &p_aout->fifos_lock );
 
   for ( i_fifo = 0; i_fifo < AOUT_MAX_FIFOS; i_fifo++ )