From 2004c046663828bcb6e81504c4645c9dffcbf521 Mon Sep 17 00:00:00 2001 From: Juergen Keil Date: Wed, 23 Oct 2002 10:48:17 +0000 Subject: Sanity check the qt file, before we try to open it. The qt demuxer was allocating huge amounts of memory, when an .avi file was to be identified by content. CVS patchset: 2961 CVS date: 2002/10/23 10:48:17 --- src/demuxers/demux_qt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 334a837aa..49de24215 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.98 2002/10/23 04:58:15 tmmm Exp $ + * $Id: demux_qt.c,v 1.99 2002/10/23 10:48:17 jkeil Exp $ * */ @@ -1927,6 +1927,10 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str case METHOD_BY_CONTENT: + if (!is_qt_file(this->input)) { + free (this); + return NULL; + } if ((this->qt = create_qt_info()) == NULL) { free (this); return NULL; @@ -1957,6 +1961,10 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str return NULL; } + if (!is_qt_file(this->input)) { + free (this); + return NULL; + } if ((this->qt = create_qt_info()) == NULL) { free (this); return NULL; -- cgit v1.2.3