Mercurial > mplayer.hg
comparison libmpcodecs/ad_qtaudio.c @ 30614:ed516abd6137
Fix the stack crash(SYS3171) on OS/2 when playing qtaudio/qtvideo.
author | komh |
---|---|
date | Fri, 19 Feb 2010 13:50:16 +0000 |
parents | ac4bcd2064ce |
children | 5beb6c13ac7b |
comparison
equal
deleted
inserted
replaced
30613:e04602bd557a | 30614:ed516abd6137 |
---|---|
275 | 275 |
276 static void uninit(sh_audio_t *sh){ | 276 static void uninit(sh_audio_t *sh){ |
277 int error; | 277 int error; |
278 unsigned long ConvertedFrames=0; | 278 unsigned long ConvertedFrames=0; |
279 unsigned long ConvertedBytes=0; | 279 unsigned long ConvertedBytes=0; |
280 | |
281 #ifdef WIN32_LOADER | |
282 Setup_FS_Segment(); | |
283 #endif | |
284 | |
280 error=SoundConverterEndConversion(myConverter,NULL,&ConvertedFrames,&ConvertedBytes); | 285 error=SoundConverterEndConversion(myConverter,NULL,&ConvertedFrames,&ConvertedBytes); |
281 mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"SoundConverterEndConversion:%i\n",error); | 286 mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"SoundConverterEndConversion:%i\n",error); |
282 error = SoundConverterClose(myConverter); | 287 error = SoundConverterClose(myConverter); |
283 mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"SoundConverterClose:%i\n",error); | 288 mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"SoundConverterClose:%i\n",error); |
284 // error = TerminateQTML(); | 289 // error = TerminateQTML(); |
298 unsigned long FramesToGet=0; //how many frames the demuxer has to get | 303 unsigned long FramesToGet=0; //how many frames the demuxer has to get |
299 unsigned long InputBufferSize=0; //size of the input buffer | 304 unsigned long InputBufferSize=0; //size of the input buffer |
300 unsigned long ConvertedFrames=0; | 305 unsigned long ConvertedFrames=0; |
301 unsigned long ConvertedBytes=0; | 306 unsigned long ConvertedBytes=0; |
302 | 307 |
308 #ifdef WIN32_LOADER | |
309 Setup_FS_Segment(); | |
310 #endif | |
311 | |
303 FramesToGet=minlen/OutFrameSize; | 312 FramesToGet=minlen/OutFrameSize; |
304 if(FramesToGet*OutFrameSize<minlen && | 313 if(FramesToGet*OutFrameSize<minlen && |
305 (FramesToGet+1)*OutFrameSize<=maxlen) ++FramesToGet; | 314 (FramesToGet+1)*OutFrameSize<=maxlen) ++FramesToGet; |
306 if(FramesToGet*InFrameSize>sh->a_in_buffer_size) | 315 if(FramesToGet*InFrameSize>sh->a_in_buffer_size) |
307 FramesToGet=sh->a_in_buffer_size/InFrameSize; | 316 FramesToGet=sh->a_in_buffer_size/InFrameSize; |