From 1cc228c7225327017654ea460b0340bd91839a7e Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Sun, 29 Jun 2003 01:38:57 +0000 Subject: - fix rtsp redirections, and division by zero crash, helps with: http://stream.qtv.apple.com/events/jun/happy_wwdc/wwdc_250_100_56_ref.mov CVS patchset: 5111 CVS date: 2003/06/29 01:38:57 --- src/demuxers/demux_qt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index d4f5e744b..5470fa558 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.161 2003/06/16 02:44:46 tmmm Exp $ + * $Id: demux_qt.c,v 1.162 2003/06/29 01:38:57 hadess Exp $ * */ @@ -1394,7 +1394,8 @@ static qt_error parse_reference_atom (reference_t *ref, if (current_atom == RDRF_ATOM) { /* if the URL starts with "http://", copy it */ - if (strncmp(&ref_atom[i + 12], "http://", 7) == 0) { + if (strncmp(&ref_atom[i + 12], "http://", 7) == 0 + || strncmp(&ref_atom[i + 16], "rtsp://", 7) == 0) { /* URL is spec'd to terminate with a NULL; don't trust it */ ref->url = xine_xmalloc(BE_32(&ref_atom[i + 12]) + 1); @@ -2675,6 +2676,9 @@ static int demux_qt_get_stream_length (demux_plugin_t *this_gen) { demux_qt_t *this = (demux_qt_t *) this_gen; + if (this->qt->timescale == 0) + return 0; + return (int)((int64_t) 1000 * this->qt->duration / this->qt->timescale); } -- cgit v1.2.3