changeset 23912:de63d6fc46dd

Use goto instead of useless recursion that might fill up the stack
author reimar
date Mon, 30 Jul 2007 13:48:08 +0000
parents 62ee939b492d
children 8b9b08c45999
files libmpcodecs/ad_acm.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_acm.c	Mon Jul 30 13:46:53 2007 +0000
+++ b/libmpcodecs/ad_acm.c	Mon Jul 30 13:48:08 2007 +0000
@@ -137,6 +137,7 @@
     HRESULT ret;
     acm_context_t *priv = sh->context;
     
+retry:
     ret = acmStreamClose(priv->handle, 0);
     
     if (ret)
@@ -146,8 +147,7 @@
 	case ACMERR_CANCELED:
 	    mp_msg(MSGT_WIN32, MSGL_DBG2, "ACM_Decoder: stream busy, waiting..\n");
 	    usec_sleep(100000000);
-	    uninit(sh);
-	    return;
+	    goto retry;
 	case ACMERR_UNPREPARED:
 	case ACMERR_NOTPOSSIBLE:
 	    return;