[MPlayer-cvslog] r23932 - trunk/libmpcodecs/ad_acm.c

reimar subversion at mplayerhq.hu
Mon Jul 30 15:48:08 CEST 2007


Author: reimar
Date: Mon Jul 30 15:48:08 2007
New Revision: 23932

Log:
Use goto instead of useless recursion that might fill up the stack


Modified:
   trunk/libmpcodecs/ad_acm.c

Modified: trunk/libmpcodecs/ad_acm.c
==============================================================================
--- trunk/libmpcodecs/ad_acm.c	(original)
+++ trunk/libmpcodecs/ad_acm.c	Mon Jul 30 15:48:08 2007
@@ -137,6 +137,7 @@ static void uninit(sh_audio_t *sh)
     HRESULT ret;
     acm_context_t *priv = sh->context;
     
+retry:
     ret = acmStreamClose(priv->handle, 0);
     
     if (ret)
@@ -146,8 +147,7 @@ static void uninit(sh_audio_t *sh)
 	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;



More information about the MPlayer-cvslog mailing list