summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2002-10-29 00:37:26 +0000
committerMike Melanson <mike@multimedia.cx>2002-10-29 00:37:26 +0000
commit886760893a5c2f8a36e09ea9a6f43baa30893104 (patch)
tree8189418d7a9b48e21c78dba3d1919b71191365e7
parentef61d16617f3be26e448b8c7ff73181c717df0a7 (diff)
downloadxine-lib-886760893a5c2f8a36e09ea9a6f43baa30893104.tar.gz
xine-lib-886760893a5c2f8a36e09ea9a6f43baa30893104.tar.bz2
strengthen QT content detection
CVS patchset: 3079 CVS date: 2002/10/29 00:37:26
-rw-r--r--src/demuxers/demux_qt.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 66220274f..206b87ca4 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.106 2002/10/28 03:24:43 miguelfreitas Exp $
+ * $Id: demux_qt.c,v 1.107 2002/10/29 00:37:26 tmmm Exp $
*
*/
@@ -335,12 +335,23 @@ static void find_moov_atom(input_plugin_t *input, off_t *moov_offset,
atom_size = BE_32(&atom_preamble[0]);
atom = BE_32(&atom_preamble[4]);
+ /* if the moov atom is found, log the position and break from the loop */
if (atom == MOOV_ATOM) {
*moov_offset = input->get_current_pos(input) - ATOM_PREAMBLE_SIZE;
*moov_size = atom_size;
break;
}
+ /* if this atom is not the moov atom, make sure that it is at least one
+ * of the other top-level QT atom */
+ if ((atom != FREE_ATOM) &&
+ (atom != JUNK_ATOM) &&
+ (atom != MDAT_ATOM) &&
+ (atom != PNOT_ATOM) &&
+ (atom != SKIP_ATOM) &&
+ (atom != WIDE_ATOM))
+ break;
+
/* 64-bit length special case */
if (atom_size == 1) {
if (input->read(input, atom_preamble, ATOM_PREAMBLE_SIZE) !=
@@ -1587,8 +1598,6 @@ static void demux_qt_send_headers(demux_plugin_t *this_gen) {
demux_qt_t *this = (demux_qt_t *) this_gen;
buf_element_t *buf;
-printf ("sending qt headers\n");
-
this->video_fifo = this->stream->video_fifo;
this->audio_fifo = this->stream->audio_fifo;