summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Roitzsch <mroi@users.sourceforge.net>2004-05-14 13:31:49 +0000
committerMichael Roitzsch <mroi@users.sourceforge.net>2004-05-14 13:31:49 +0000
commit3a5674fde757f26f59784f7e50a3bf58da10ff20 (patch)
treed15c654c6c26d16fec431dd778f85070620fe306
parent0a5eddb369d318488b1858f795b5d83186d0cff9 (diff)
downloadxine-lib-3a5674fde757f26f59784f7e50a3bf58da10ff20.tar.gz
xine-lib-3a5674fde757f26f59784f7e50a3bf58da10ff20.tar.bz2
trying to fix overly enthusiastic elem demuxer
CVS patchset: 6536 CVS date: 2004/05/14 13:31:49
-rw-r--r--src/demuxers/demux_elem.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index d9a740ba3..41626d4a0 100644
--- a/src/demuxers/demux_elem.c
+++ b/src/demuxers/demux_elem.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_elem.c,v 1.82 2004/05/10 11:24:28 hadess Exp $
+ * $Id: demux_elem.c,v 1.83 2004/05/14 13:31:49 mroi Exp $
*
* demultiplexer for elementary mpeg streams
*/
@@ -204,10 +204,13 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, xine_stream_t *str
for (i = 0; i < read - 4; i++) {
lprintf ("%02x %02x %02x %02x\n", scratch[i], scratch[i+1], scratch[i+2], scratch[i+3]);
- if (!scratch[i] && !scratch[i+1] && (scratch[i+2] == 0x01) && (scratch[i+3] == 0xb3)) {
- found = 1;
- lprintf ("found header at offset 0x%x\n", i);
- break;
+ if ((scratch[i] == 0x00) && (scratch[i+1] == 0x00) && (scratch[i+2] == 0x01)) {
+ if (scratch[i+3] == 0xb3) {
+ found = 1;
+ lprintf ("found header at offset 0x%x\n", i);
+ break;
+ } else
+ return NULL;
}
}