diff --git a/libmpcodecs/ad_acm.c b/libmpcodecs/ad_acm.c index b5f8be75cf..2be77056b6 100644 --- a/libmpcodecs/ad_acm.c +++ b/libmpcodecs/ad_acm.c @@ -114,6 +114,12 @@ static int preinit(sh_audio_t *sh_audio) acmStreamSize(priv->handle, srcsize, &srcsize, ACM_STREAMSIZEF_DESTINATION); // if(srcsizenBlockAlign) srcsize=in_fmt->nBlockAlign; + if (!srcsize) + { + mp_msg(MSGT_WIN32, MSGL_WARN, "Warning! ACM codec reports srcsize=0\n"); + srcsize = 2*in_fmt->nBlockAlign; + } + mp_msg(MSGT_WIN32,MSGL_V,"Audio ACM input buffer min. size: %ld\n",srcsize); sh_audio->audio_in_minsize=2*srcsize; // audio input min. size