diff options
-rw-r--r-- | src/demuxers/demux_ac3.c | 3 | ||||
-rw-r--r-- | src/demuxers/demux_dts.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c index b84617499..51922bedc 100644 --- a/src/demuxers/demux_ac3.c +++ b/src/demuxers/demux_ac3.c @@ -164,6 +164,7 @@ static int open_ac3_file(demux_ac3_t *this) { /* Check for wav header, as we'll handle AC3 with a wav header shoved * on the front for CD burning */ + /* FIXME: This is risky. Real LPCM may contain anything, even sync words. */ if ( memcmp(peak, "RIFF", 4) == 0 || memcmp(&peak[8], "WAVEfmt ", 8) == 0 ) { /* Check this looks like a cd audio wav */ unsigned int audio_type; @@ -189,7 +190,7 @@ static int open_ac3_file(demux_ac3_t *this) { lprintf("found the start of the data at offset %d\n", offset); break; } else - offset += chunk_size; + offset += 8 + chunk_size; } } diff --git a/src/demuxers/demux_dts.c b/src/demuxers/demux_dts.c index 81d4470ec..a2425c901 100644 --- a/src/demuxers/demux_dts.c +++ b/src/demuxers/demux_dts.c @@ -114,6 +114,7 @@ static int open_dts_file(demux_dts_t *this) { /* Check for wav header, as we'll handle DTS with a wav header shoved * on the front for CD burning */ + /* FIXME: This is risky. Real LPCM may contain anything, even sync words. */ if ( memcmp(peak, "RIFF", 4) == 0 || memcmp(&peak[8], "WAVEfmt ", 8) == 0 ) { /* Check this looks like a cd audio wav */ unsigned int audio_type; @@ -139,7 +140,7 @@ static int open_dts_file(demux_dts_t *this) { lprintf("found the start of the data at offset %d\n", offset); break; } else - offset += chunk_size; + offset += 8 + chunk_size; } } |