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

aout: fix infinite loop on error (fixes #7711)

parent 606ac518
...@@ -67,7 +67,6 @@ int aout_DecNew( audio_output_t *p_aout, ...@@ -67,7 +67,6 @@ int aout_DecNew( audio_output_t *p_aout,
} }
aout_owner_t *owner = aout_owner(p_aout); aout_owner_t *owner = aout_owner(p_aout);
int ret = 0;
/* TODO: reduce lock scope depending on decoder's real need */ /* TODO: reduce lock scope depending on decoder's real need */
aout_lock( p_aout ); aout_lock( p_aout );
...@@ -92,8 +91,8 @@ int aout_DecNew( audio_output_t *p_aout, ...@@ -92,8 +91,8 @@ int aout_DecNew( audio_output_t *p_aout,
aout_OutputDelete (p_aout); aout_OutputDelete (p_aout);
error: error:
aout_volume_Delete (owner->volume); aout_volume_Delete (owner->volume);
ret = -1; aout_unlock (p_aout);
goto error; return -1;
} }
owner->sync.end = VLC_TS_INVALID; owner->sync.end = VLC_TS_INVALID;
...@@ -102,8 +101,7 @@ error: ...@@ -102,8 +101,7 @@ error:
aout_unlock( p_aout ); aout_unlock( p_aout );
atomic_init (&owner->buffers_lost, 0); atomic_init (&owner->buffers_lost, 0);
return 0;
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