[vlc-commits] aout: fix error handling

Rémi Denis-Courmont git at videolan.org
Sun Jul 22 13:36:15 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jul 22 14:34:13 2012 +0300| [00eef9c2cbe0ac696317ba054dceb464f9fcd9b8] | committer: Rémi Denis-Courmont

aout: fix error handling

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=00eef9c2cbe0ac696317ba054dceb464f9fcd9b8
---

 src/audio_output/dec.c |    8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 0bc2e66..f24a27f 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -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;
 }



More information about the vlc-commits mailing list