diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-07-04 15:47:29 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2008-07-04 15:47:29 +0200 |
commit | e658d8485c47059959ea8b1b2b0342b7d017d5d3 (patch) | |
tree | 6d5d46ee23492047482ce379d6ea1dab2346d4f0 /src | |
parent | c2a8075feb8af0f1e53279df298b2fb3fbbf270a (diff) | |
download | xine-lib-e658d8485c47059959ea8b1b2b0342b7d017d5d3.tar.gz xine-lib-e658d8485c47059959ea8b1b2b0342b7d017d5d3.tar.bz2 |
Use the new _x_is_fourcc() function and also memcmp().
--HG--
extra : transplant_source : %F8H%5B%D0%15z%0E%22%CC.%84%E6%ADA/%FF%0F%81%BCS
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_aac.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/demuxers/demux_aac.c b/src/demuxers/demux_aac.c index 63c787bc7..b8e6ec5c4 100644 --- a/src/demuxers/demux_aac.c +++ b/src/demuxers/demux_aac.c @@ -95,8 +95,7 @@ static int open_aac_file(demux_aac_t *this) { return 0; /* Check for an ADIF header - should be at the start of the file */ - if ((peak[0] == 'A') && (peak[1] == 'D') && - (peak[2] == 'I') && (peak[3] == 'F')) { + if (_x_is_fourcc(peak, "AIDF")) { lprintf("found ADIF header\n"); return 1; } @@ -134,9 +133,7 @@ static int open_aac_file(demux_aac_t *this) { if ((frame_size > 0) && (data_start+frame_size < MAX_PREVIEW_SIZE-1) && /* first 28 bits must be identical */ - (peak[data_start ] ==peak[data_start+frame_size ]) && - (peak[data_start+1] ==peak[data_start+frame_size+1]) && - (peak[data_start+2] ==peak[data_start+frame_size+2]) && + memcmp(&peak[data_start], &peak[data_start+frame_size], 4) == 0 && (peak[data_start+3]>>4==peak[data_start+frame_size+3]>>4)) { lprintf("found second ADTS header\n"); |