summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2006-11-14 21:51:32 +0000
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2006-11-14 21:51:32 +0000
commit8eb5b336bcf0ec5f00bca810572dc5d180c870f4 (patch)
tree43c3ed62393f1be69c998438b54fdec6b3d502e5 /src
parentadab76cbec3193adeca185e723bbb542f62c77f4 (diff)
downloadxine-lib-8eb5b336bcf0ec5f00bca810572dc5d180c870f4.tar.gz
xine-lib-8eb5b336bcf0ec5f00bca810572dc5d180c870f4.tar.bz2
Make the misdetection of audio data as AAC less likely.
(Should fix playback of some MP3 files, at least.) CVS patchset: 8379 CVS date: 2006/11/14 21:51:32
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_aac.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/demuxers/demux_aac.c b/src/demuxers/demux_aac.c
index 8382c3d94..b9e4c4084 100644
--- a/src/demuxers/demux_aac.c
+++ b/src/demuxers/demux_aac.c
@@ -21,7 +21,7 @@
* This demuxer detects ADIF and ADTS headers in AAC files.
* Then it shovels buffer-sized chunks over to the AAC decoder.
*
- * $Id: demux_aac.c,v 1.11 2006/03/11 09:21:25 tmattern Exp $
+ * $Id: demux_aac.c,v 1.12 2006/11/14 21:51:32 dsalt Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -108,8 +108,12 @@ static int open_aac_file(demux_aac_t *this) {
if ((frame_size > 0) &&
(this->data_start+frame_size < MAX_PREVIEW_SIZE-1) &&
- (peak[this->data_start+frame_size] == 0xff) &&
- ((peak[this->data_start+frame_size+1] & 0xf6) == 0xf0)) {
+ /* first 28 bits must be identical */
+ (peak[this->data_start ] ==peak[this->data_start+frame_size ]) &&
+ (peak[this->data_start+1] ==peak[this->data_start+frame_size+1]) &&
+ (peak[this->data_start+2] ==peak[this->data_start+frame_size+2]) &&
+ (peak[this->data_start+3]>>4==peak[this->data_start+frame_size+3]>>4))
+ {
lprintf("found second ADTS header\n");
_x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);