Commit df08e998 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix infinite mixing loop with dummy audio output

parent 006127ff
...@@ -57,13 +57,13 @@ int OpenAudio ( vlc_object_t * p_this ) ...@@ -57,13 +57,13 @@ int OpenAudio ( vlc_object_t * p_this )
&& var_InheritBool( p_this, "spdif" ) ) && var_InheritBool( p_this, "spdif" ) )
{ {
p_aout->output.output.i_format = VLC_CODEC_SPDIFL; p_aout->output.output.i_format = VLC_CODEC_SPDIFL;
p_aout->output.i_nb_samples = A52_FRAME_NB;
p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE; p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
p_aout->output.output.i_frame_length = A52_FRAME_NB; p_aout->output.output.i_frame_length = A52_FRAME_NB;
} }
else else
p_aout->output.output.i_format = p_aout->output.output.i_format =
HAVE_FPU ? VLC_CODEC_FL32 : VLC_CODEC_S16N; HAVE_FPU ? VLC_CODEC_FL32 : VLC_CODEC_S16N;
p_aout->output.i_nb_samples = A52_FRAME_NB;
/* Create the variable for the audio-device */ /* Create the variable for the audio-device */
var_Create( p_aout, "audio-device", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE ); var_Create( p_aout, "audio-device", VLC_VAR_INTEGER | VLC_VAR_HASCHOICE );
......
...@@ -98,6 +98,9 @@ static int MixBuffer( aout_instance_t * p_aout, float volume ) ...@@ -98,6 +98,9 @@ static int MixBuffer( aout_instance_t * p_aout, float volume )
aout_fifo_t *p_fifo = &p_input->fifo; aout_fifo_t *p_fifo = &p_input->fifo;
mtime_t now = mdate(); mtime_t now = mdate();
const unsigned samples = p_aout->output.i_nb_samples; const unsigned samples = p_aout->output.i_nb_samples;
/* FIXME: Remove this silly constraint. Just pass buffers as they come to
* "smart" audio outputs. */
assert( samples > 0 );
aout_lock_input_fifos( p_aout ); aout_lock_input_fifos( p_aout );
aout_lock_output_fifo( p_aout ); aout_lock_output_fifo( p_aout );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment