[vlc-devel] commit: Fix previous commit ( Rémi Denis-Courmont )

git version control git at videolan.org
Sun Nov 29 17:22:58 CET 2009


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Nov 29 18:22:51 2009 +0200| [b69d64d4abe24d01ceac7a02e2621454f10c49ba] | committer: Rémi Denis-Courmont 

Fix previous commit

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

 src/audio_output/output.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index bb80e01..82ab3a7 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -342,8 +342,6 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
         p_aout->output.fifo.pp_last = &p_aout->output.fifo.p_first;
     }
 
-    aout_unlock_output_fifo( p_aout );
-
     if ( !b_can_sleek &&
           ( (p_buffer->i_pts - start_date > AOUT_PTS_TOLERANCE)
              || (start_date - p_buffer->i_pts > AOUT_PTS_TOLERANCE) ) )
@@ -354,6 +352,9 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
         msg_Warn( p_aout, "output date isn't PTS date, requesting "
                   "resampling (%"PRId64")", difference );
 
+        aout_FifoMoveDates( p_aout, &p_aout->output.fifo, difference );
+        aout_unlock_output_fifo( p_aout );
+
         aout_lock_input_fifos( p_aout );
         for ( i = 0; i < p_aout->i_nb_inputs; i++ )
         {
@@ -361,10 +362,10 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
 
             aout_FifoMoveDates( p_aout, p_fifo, difference );
         }
-
-        aout_FifoMoveDates( p_aout, &p_aout->output.fifo, difference );
         aout_unlock_input_fifos( p_aout );
     }
+    else
+        aout_unlock_output_fifo( p_aout );
 
     return p_buffer;
 }




More information about the vlc-devel mailing list