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

aout: fix error handling

parent aedd5217
......@@ -97,10 +97,7 @@ int aout_DecNew( audio_output_t *p_aout,
vlc_atomic_set (&owner->restart, 0);
owner->volume = aout_volume_New (p_aout, p_replay_gain);
if( aout_OutputNew( p_aout, p_format ) < 0 )
{
ret = -1;
goto error;
}
aout_volume_SetFormat (owner->volume, owner->mixer_format.i_format);
/* Create the audio filtering "input" pipeline */
......@@ -113,11 +110,10 @@ int aout_DecNew( audio_output_t *p_aout,
if (owner->input == NULL)
{
aout_OutputDelete (p_aout);
error:
aout_volume_Delete (owner->volume);
aout_unlock (p_aout);
return -1;
ret = -1;
}
error:
aout_unlock( p_aout );
return ret;
}
......
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