From 72d75532d175a6c1dbeac25fe689be6b3379bec7 Mon Sep 17 00:00:00 2001 From: Guenter Bartsch Date: Sat, 11 Jan 2003 05:26:55 +0000 Subject: open and close output CVS patchset: 3862 CVS date: 2003/01/11 05:26:55 --- src/libw32dll/qt_decoder.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c index 3929a779a..07c3aa22d 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.9 2003/01/11 04:57:50 guenter Exp $ + * $Id: qt_decoder.c,v 1.10 2003/01/11 05:26:55 guenter Exp $ * * quicktime video/audio decoder plugin, using win32 dlls * most of this code comes directly from MPlayer @@ -566,6 +566,10 @@ static void qta_dispose (audio_decoder_t *this_gen) { printf ("qt_audio: SoundConverterClose:%i\n",error); #endif + if (this->output_open) + this->stream->audio_out->close (this->stream->audio_out, this->stream); + this->output_open = 0; + free (this); } @@ -971,6 +975,8 @@ static void qtv_init_driver (qtv_decoder_t *this, buf_element_t *buf) { this->codec_initialized = 1; + this->stream->video_out->open (this->stream->video_out, this->stream); + pthread_mutex_unlock(&win32_codec_mutex); } @@ -1092,8 +1098,13 @@ static void qtv_dispose (video_decoder_t *this_gen) { qtv_decoder_t *this = (qtv_decoder_t *) this_gen; + if (this->decoder_ok) { + this->stream->video_out->close(this->stream->video_out, this->stream); + this->decoder_ok = 0; + } + #ifdef LOG - printf ("qt_video: close\n"); + printf ("qt_video: dispose\n"); #endif free (this); -- cgit v1.2.3