From 969f747b664e3511a8a9d67bcb7f2391191a56a1 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Mon, 17 Feb 2003 03:19:58 +0000 Subject: missing files from my last commit CVS patchset: 4179 CVS date: 2003/02/17 03:19:58 --- src/libw32dll/qt_decoder.c | 18 ++++++++++++++---- src/libw32dll/w32codec.c | 6 +++++- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 9d9e69e18..e548deac3 100644 --- a/src/libw32dll/qt_decoder.c +++ b/src/libw32dll/qt_decoder.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: qt_decoder.c,v 1.14 2003/01/30 14:56:45 f1rmb Exp $ + * $Id: qt_decoder.c,v 1.15 2003/02/17 03:19:58 miguelfreitas Exp $ * * quicktime video/audio decoder plugin, using win32 dlls * most of this code comes directly from MPlayer @@ -178,7 +178,8 @@ typedef struct qta_decoder_s { uint8_t data[BUFSIZE]; int data_len; int num_frames; - + + ldt_fs_t *ldt_fs; } qta_decoder_t; #ifdef LOG @@ -234,7 +235,7 @@ static void qta_init_driver (qta_decoder_t *this, buf_element_t *buf) { printf ("qt_audio: init_driver... (mutex locked)\n"); #endif - Setup_LDT_Keeper(); + this->ldt_fs = Setup_LDT_Keeper(); this->qtml_dll = LoadLibraryA("qtmlClient.dll"); @@ -488,6 +489,8 @@ static void qta_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { int num_frames = this->data_len / this->InFrameSize; long out_frames, out_bytes; int error, frames_left, bytes_sent; + + Check_FS_Segment(); pthread_mutex_lock(&win32_codec_mutex); error = this->SoundConverterConvertBuffer (this->myConverter, @@ -569,6 +572,8 @@ static void qta_dispose (audio_decoder_t *this_gen) { #ifdef LOG printf ("qt_audio: SoundConverterClose:%i\n",error); #endif + Restore_LDT_Keeper(this->ldt_fs); + this->ldt_fs = NULL; } if (this->output_open) @@ -731,6 +736,7 @@ typedef struct qtv_decoder_s { long rowBytes); OSErr (*NewHandleClear)(Size byteCount); + ldt_fs_t *ldt_fs; } qtv_decoder_t; #ifdef LOG @@ -790,7 +796,7 @@ static void qtv_init_driver (qtv_decoder_t *this, buf_element_t *buf) { printf ("qt_video: mutex locked\n"); #endif - Setup_LDT_Keeper(); + this->ldt_fs = Setup_LDT_Keeper(); this->qtml_dll = LoadLibraryA("qtmlClient.dll"); @@ -1037,6 +1043,8 @@ static void qtv_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { ComponentResult cres; vo_frame_t *img; + + Check_FS_Segment(); pthread_mutex_lock(&win32_codec_mutex); @@ -1107,6 +1115,8 @@ static void qtv_dispose (video_decoder_t *this_gen) { if (this->codec_initialized) { this->stream->video_out->close(this->stream->video_out, this->stream); this->codec_initialized = 0; + Restore_LDT_Keeper(this->ldt_fs); + this->ldt_fs = NULL; } #ifdef LOG diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index d35602f07..8f088e9b6 100644 --- a/src/libw32dll/w32codec.c +++ b/src/libw32dll/w32codec.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: w32codec.c,v 1.116 2003/01/16 22:29:55 miguelfreitas Exp $ + * $Id: w32codec.c,v 1.117 2003/02/17 03:19:58 miguelfreitas Exp $ * * routines for using w32 codecs * DirectShow support by Miguel Freitas (Nov/2001) @@ -765,6 +765,8 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) { vo_frame_t *img; uint8_t *img_buffer = this->img_buffer; + Check_FS_Segment(); + /* decoder video frame */ this->bih->biSizeImage = this->size; @@ -1384,6 +1386,8 @@ static void w32a_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) { if( (int)buf->size <= 0 ) return; + Check_FS_Segment(); + w32a_decode_audio (this, buf->content, buf->size, buf->decoder_flags & BUF_FLAG_FRAME_END, buf->pts); -- cgit v1.2.3