changeset 11683:edd57e928b94

workaround for min_srcsize==0 (scg726.acm)
author arpi
date Fri, 26 Dec 2003 09:57:56 +0000
parents 4c914d32b230
children 4a5ae20f15d3
files libmpcodecs/ad_acm.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/ad_acm.c	Fri Dec 26 09:51:16 2003 +0000
+++ b/libmpcodecs/ad_acm.c	Fri Dec 26 09:57:56 2003 +0000
@@ -114,6 +114,12 @@
     acmStreamSize(priv->handle, srcsize, &srcsize, ACM_STREAMSIZEF_DESTINATION);
 //    if(srcsize<in_fmt->nBlockAlign) 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