summaryrefslogtreecommitdiffstats
path: root/libmpcodecs/ad_qtaudio.c
diff options
context:
space:
mode:
authorarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-07 02:26:45 +0000
committerarpi <arpi@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-12-07 02:26:45 +0000
commite0143739c360b3f696f828c82ab25e8af98bceea (patch)
tree533a9ea2d17d39b8a6a70abefe3195b3c3e7a5e6 /libmpcodecs/ad_qtaudio.c
parentb318b50c821ee7b05bb24387c2cc55dfcec6acae (diff)
downloadmpv-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.c15
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){