]> git.sesse.net Git - vlc/commitdiff
Fixed use of released pointer (race condition).
authorLaurent Aimar <fenrir@videolan.org>
Tue, 12 Jun 2007 18:26:00 +0000 (18:26 +0000)
committerLaurent Aimar <fenrir@videolan.org>
Tue, 12 Jun 2007 18:26:00 +0000 (18:26 +0000)
src/audio_output/output.c

index 4b555645719ae348f3e235423c5b4a60b4c1a759..f425ccac5990aee3a89c1325ae00d276e5396421 100644 (file)
@@ -325,10 +325,12 @@ aout_buffer_t * aout_OutputNextBuffer( aout_instance_t * p_aout,
      * --Gibalou
      */
     {
+        const mtime_t i_delta = p_buffer->start_date - start_date;
         vlc_mutex_unlock( &p_aout->output_fifo_lock );
+
         if ( !p_aout->output.b_starving )
             msg_Dbg( p_aout, "audio output is starving ("I64Fd"), "
-                     "playing silence", p_buffer->start_date - start_date );
+                     "playing silence", i_delta );
         p_aout->output.b_starving = 1;
         return NULL;
     }