]> git.sesse.net Git - vlc/blobdiff - src/audio_output/dec.c
Fix another potential audio output dead lock
[vlc] / src / audio_output / dec.c
index 3887c6c828c96dce83676a60d8baaccf90a94573..823cce058fefe68b38533fd55ffd4bd2f92fa79a 100644 (file)
 
 #include <vlc_common.h>
 
-#ifdef HAVE_ALLOCA_H
-#   include <alloca.h>
-#endif
-
 #include <vlc_aout.h>
 #include <vlc_input.h>
 
@@ -269,7 +265,7 @@ aout_buffer_t * aout_DecNewBuffer( aout_input_t * p_input,
     /* This necessarily allocates in the heap. */
     p_buffer = aout_BufferAlloc( &p_input->input_alloc, duration, NULL );
     if( p_buffer != NULL )
-        p_buffer->i_nb_bytes = i_nb_samples * p_input->input.i_bytes_per_frame
+        p_buffer->i_buffer = i_nb_samples * p_input->input.i_bytes_per_frame
                                   / p_input->input.i_frame_length;
 
     /* Suppose the decoder doesn't have more than one buffered buffer */
@@ -327,9 +323,9 @@ int aout_DecPlay( aout_instance_t * p_aout, aout_input_t * p_input,
 
         p_new_buffer = aout_BufferAlloc( &p_input->input_alloc, duration, NULL);
         vlc_memcpy( p_new_buffer->p_buffer, p_buffer->p_buffer,
-                    p_buffer->i_nb_bytes );
+                    p_buffer->i_buffer );
         p_new_buffer->i_nb_samples = p_buffer->i_nb_samples;
-        p_new_buffer->i_nb_bytes = p_buffer->i_nb_bytes;
+        p_new_buffer->i_buffer = p_buffer->i_buffer;
         p_new_buffer->i_pts = p_buffer->i_pts;
         p_new_buffer->i_length = p_buffer->i_length;
         aout_BufferFree( p_buffer );