diff options
author | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-07 02:26:45 +0000 |
---|---|---|
committer | arpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2002-12-07 02:26:45 +0000 |
commit | e0143739c360b3f696f828c82ab25e8af98bceea (patch) | |
tree | 533a9ea2d17d39b8a6a70abefe3195b3c3e7a5e6 /libmpcodecs/ad_qtaudio.c | |
parent | b318b50c821ee7b05bb24387c2cc55dfcec6acae (diff) | |
download | mpv-e0143739c360b3f696f828c82ab25e8af98bceea.tar.bz2 mpv-e0143739c360b3f696f828c82ab25e8af98bceea.tar.xz |
fixed in/out framesize rounding bug (causing low-rate QCLP hangup/looping)
disabled TerminateQTML(), as it does carshing (due to patched InitializeQTML)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8390 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpcodecs/ad_qtaudio.c')
-rw-r--r-- | libmpcodecs/ad_qtaudio.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libmpcodecs/ad_qtaudio.c b/libmpcodecs/ad_qtaudio.c index be568307b3..8ba47c2bb2 100644 --- a/libmpcodecs/ad_qtaudio.c +++ b/libmpcodecs/ad_qtaudio.c @@ -201,7 +201,7 @@ static int preinit(sh_audio_t *sh){ 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 @@ static void uninit(sh_audio_t *sh){ 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 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen) // 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){ |