From: Darrick Servis Date: Sun, May 27 2007 04:09:19 +0000 Subject wav files with extra chunks cause libxine to hang (SF bug 1726288) Given a wave file with chunks in the following order: sox: Detected file format type: wav sox: WAV Chunk fmt length 18 sox: WAV Chunk bext length 602 sox: WAV Chunk data length 32366592 sox: WAV Chunk levl length 28228 causes code in demux_dts.c and demux_ac3.c to hang while searching for the 'data' chunk. diff --git a/src/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c --- a/src/demuxers/demux_ac3.c +++ b/src/demuxers/demux_ac3.c @@ -186,7 +186,7 @@ static int open_ac3_file(demux_ac3_t *th lprintf("found the start of the data at offset %d\n", offset); break; } else - offset += chunk_size; + offset += chunk_size + 8; } } diff --git a/src/demuxers/demux_dts.c b/src/demuxers/demux_dts.c --- a/src/demuxers/demux_dts.c +++ b/src/demuxers/demux_dts.c @@ -136,7 +136,7 @@ static int open_dts_file(demux_dts_t *th lprintf("found the start of the data at offset %d\n", offset); break; } else - offset += chunk_size; + offset += chunk_size + 8; } }