# HG changeset patch # User arpi # Date 1039228005 0 # Node ID e8c51ec863403f1583cdd18beb98021db630a0fe # Parent 45eb2d4d633cfb21f978e381ceaf22588d58cb29 fixed in/out framesize rounding bug (causing low-rate QCLP hangup/looping) disabled TerminateQTML(), as it does carshing (due to patched InitializeQTML) diff -r 45eb2d4d633c -r e8c51ec86340 libmpcodecs/ad_qtaudio.c --- a/libmpcodecs/ad_qtaudio.c Sat Dec 07 01:25:30 2002 +0000 +++ b/libmpcodecs/ad_qtaudio.c Sat Dec 07 02:26:45 2002 +0000 @@ -201,7 +201,7 @@ printf("OutputBufferSize = %li\n",OutputBufferSize); printf("FramesToGet = %li\n",FramesToGet); - InFrameSize=InputBufferSize/FramesToGet; + InFrameSize=(InputBufferSize+FramesToGet-1)/FramesToGet; OutFrameSize=OutputBufferSize/FramesToGet; printf("FrameSize: %i -> %i\n",InFrameSize,OutFrameSize); @@ -249,11 +249,11 @@ printf("SoundConverterEndConversion:%i\n",error); error = SoundConverterClose(myConverter); printf("SoundConverterClose:%i\n",error); - error = TerminateQTML(); - printf("TerminateQTML:%i\n",error); - FreeLibrary( qtml_dll ); - qtml_dll = NULL; - printf("qt dll loader uninit done\n"); +// error = TerminateQTML(); +// printf("TerminateQTML:%i\n",error); +// FreeLibrary( qtml_dll ); +// qtml_dll = NULL; +// printf("qt dll loader uninit done\n"); } static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen){ @@ -290,7 +290,8 @@ // printf("ConvertedFrames = %li\n",ConvertedFrames); // printf("ConvertedBytes = %li\n",ConvertedBytes); - InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!! +// InputBufferSize=(ConvertedBytes/OutFrameSize)*InFrameSize; // FIXME!! + InputBufferSize=FramesToGet*InFrameSize; sh->a_in_buffer_len-=InputBufferSize; if(sh->a_in_buffer_len<0) sh->a_in_buffer_len=0; // should not happen... else if(sh->a_in_buffer_len>0){