1
mirror of https://github.com/mpv-player/mpv synced 2024-09-12 23:45:53 +02:00

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
This commit is contained in:
arpi 2002-12-07 02:26:45 +00:00
parent b318b50c82
commit e0143739c3

View File

@ -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){