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