# HG changeset patch # User reimar # Date 1185803288 0 # Node ID de63d6fc46ddc5774731c1a56d86c1a88206ad2d # Parent 62ee939b492d93bb4f1075ae12b0b035545242c5 Use goto instead of useless recursion that might fill up the stack diff -r 62ee939b492d -r de63d6fc46dd libmpcodecs/ad_acm.c --- 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;