Fix the stack crash(SYS3171) on OS/2 when playing qtaudio/qtvideo.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30656 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
komh 2010-02-19 13:50:16 +00:00
parent c9cf9649cf
commit 0599ce10ab
2 changed files with 13 additions and 0 deletions

View File

@ -277,6 +277,11 @@ static void uninit(sh_audio_t *sh){
int error;
unsigned long ConvertedFrames=0;
unsigned long ConvertedBytes=0;
#ifdef WIN32_LOADER
Setup_FS_Segment();
#endif
error=SoundConverterEndConversion(myConverter,NULL,&ConvertedFrames,&ConvertedBytes);
mp_msg(MSGT_DECAUDIO,MSGL_DBG2,"SoundConverterEndConversion:%i\n",error);
error = SoundConverterClose(myConverter);
@ -300,6 +305,10 @@ static int decode_audio(sh_audio_t *sh,unsigned char *buf,int minlen,int maxlen)
unsigned long ConvertedFrames=0;
unsigned long ConvertedBytes=0;
#ifdef WIN32_LOADER
Setup_FS_Segment();
#endif
FramesToGet=minlen/OutFrameSize;
if(FramesToGet*OutFrameSize<minlen &&
(FramesToGet+1)*OutFrameSize<=maxlen) ++FramesToGet;

View File

@ -316,6 +316,10 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
sh->disp_w, sh->disp_h);
if(!mpi) return NULL;
#ifdef WIN32_LOADER
Setup_FS_Segment();
#endif
decpar.data = (char*)data;
decpar.bufferSize = len;
(**framedescHandle).dataSize=len;