diff options
author | Lorenzo Desole <lorenzodes@fastwebnet.it> | 2011-03-20 20:03:30 +0100 |
---|---|---|
committer | Lorenzo Desole <lorenzodes@fastwebnet.it> | 2011-03-20 20:03:30 +0100 |
commit | b9d7a3c82c160c8871c9f9effbc0a91c0d42fd53 (patch) | |
tree | e70ad62b1026e58fff9e68dc189f0a0525cb2543 /src | |
parent | a2f066e06168346781003bf8766fb06b7fd1a7e9 (diff) | |
download | xine-lib-b9d7a3c82c160c8871c9f9effbc0a91c0d42fd53.tar.gz xine-lib-b9d7a3c82c160c8871c9f9effbc0a91c0d42fd53.tar.bz2 |
Check that we've found both AAC signatures
demux_aac.c looks for 2 signatures in the given stream to detect if it is an
AAC stream, however only the absence of the second signature is used to rule
out a positive match. This may lead to false positives.
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_aac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/demuxers/demux_aac.c b/src/demuxers/demux_aac.c index 6615f4f61..0ac645b78 100644 --- a/src/demuxers/demux_aac.c +++ b/src/demuxers/demux_aac.c @@ -122,6 +122,10 @@ static int open_aac_file(demux_aac_t *this) { syncword = (syncword << 8) | peak[i]; } + /* did we really find the ADTS header? */ + if (i == MAX_PREVIEW_SIZE) + return 0; /* No, we didn't */ + /* Look for second ADTS header to confirm it's really aac */ if (data_start + 5 < MAX_PREVIEW_SIZE) { int frame_size = ((peak[data_start+3] & 0x03) << 11) | |