summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-01-06 05:39:07 +0000
committerMike Melanson <mike@multimedia.cx>2004-01-06 05:39:07 +0000
commit6f75f546fd6e928245911e8ebcea680a7c9046b6 (patch)
treef48bcec0803715ab1c71924c311681515a944754
parent3951439e71473236fbeda9bf72a45b038aea8fb6 (diff)
downloadxine-lib-6f75f546fd6e928245911e8ebcea680a7c9046b6.tar.gz
xine-lib-6f75f546fd6e928245911e8ebcea680a7c9046b6.tar.bz2
hack to support a rather malformed QT file, courtesy of Drew
'dantealiegri' Ogle <dantealiegri at umbc.edu> CVS patchset: 6006 CVS date: 2004/01/06 05:39:07
-rw-r--r--src/demuxers/demux_qt.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 52cc1a28a..3b3952c74 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.173 2003/11/16 23:33:43 f1rmb Exp $
+ * $Id: demux_qt.c,v 1.174 2004/01/06 05:39:07 tmmm Exp $
*
*/
@@ -454,6 +454,8 @@ static void find_moov_atom(input_plugin_t *input, off_t *moov_offset,
off_t atom_size;
qt_atom atom;
unsigned char atom_preamble[ATOM_PREAMBLE_SIZE];
+ int unknown_atoms = 0;
+
/* init the passed variables */
*moov_offset = *moov_size = -1;
@@ -502,7 +504,9 @@ static void find_moov_atom(input_plugin_t *input, off_t *moov_offset,
}
/* if this atom is not the moov atom, make sure that it is at least one
- * of the other top-level QT atom */
+ * of the other top-level QT atom.
+ * However, allow a configurable amount ( currently 1 ) atom be a
+ * non known atom, in hopes a known atom will be found */
if ((atom != FREE_ATOM) &&
(atom != JUNK_ATOM) &&
(atom != MDAT_ATOM) &&
@@ -510,8 +514,12 @@ static void find_moov_atom(input_plugin_t *input, off_t *moov_offset,
(atom != SKIP_ATOM) &&
(atom != WIDE_ATOM) &&
(atom != PICT_ATOM) &&
- (atom != FTYP_ATOM))
- break;
+ (atom != FTYP_ATOM) ) {
+ if (unknown_atoms > 1)
+ break;
+ else
+ unknown_atoms++;
+ }
/* 0 special case-- just skip the atom */
if (atom_size == 0)