assert (owner->volume.mixer == NULL);
owner->volume.mixer = aout_MixerNew (p_aout, owner->mixer_format.i_format);
- if (owner->volume.mixer == NULL)
- {
- aout_OutputDelete( p_aout );
- goto error;
- }
date_Init (&owner->sync.date, owner->mixer_format.i_rate, 1);
date_Set (&owner->sync.date, VLC_TS_INVALID);
if (aout_OutputNew (aout, &input->input))
{
-error:
input->b_error = true;
return; /* we are officially screwed */
}
owner->volume.mixer = aout_MixerNew (aout, owner->mixer_format.i_format);
- if (owner->volume.mixer == NULL)
- {
- aout_OutputDelete (aout);
- goto error;
- }
if (aout_InputNew (aout, input, &input->request_vout))
assert (input->b_error);
mixer->module = module_need(mixer, "audio mixer", NULL, false);
if (mixer->module == NULL)
{
- msg_Err(mixer, "no suitable audio mixer");
vlc_object_release(mixer);
mixer = NULL;
}
*/
void aout_MixerRun(audio_mixer_t *mixer, block_t *block, float amp)
{
- mixer->mix(mixer, block, amp);
+ if (mixer != NULL)
+ mixer->mix(mixer, block, amp);
}