diff options
author | Gurudatta Bhakte <gurudattax.bhakte@intel.com> | 2012-07-27 19:21:34 +0530 |
---|---|---|
committer | Steve Kondik <steve@cyngn.com> | 2015-10-23 12:38:46 -0500 |
commit | ae81d6674eff215876309df39d3159a79fe83e36 (patch) | |
tree | 4185709ede3a97b1c347081e65bcb8b570f9137d /media/libstagefright/FLACExtractor.cpp | |
parent | 7c5a700734540a971cbf7f901e201f7750e3027d (diff) | |
download | frameworks_av-ae81d6674eff215876309df39d3159a79fe83e36.zip frameworks_av-ae81d6674eff215876309df39d3159a79fe83e36.tar.gz frameworks_av-ae81d6674eff215876309df39d3159a79fe83e36.tar.bz2 |
FLAC coded file does not play (single metadata block files)
FLAC files which has the last metadata block flag set in
STREAMINFO were not playing. Sniff of FLAC is modified to
accomodate this set flag.
Change-Id: I76f216cc2cde6e10958324afbc704fc3e5a0e2bf
Author: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Gurudatta Bhakte <gurudattax.bhakte@intel.com>
Signed-off-by: Shuo Gao <shuo.gao@intel.com>
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
Signed-off-by: Jack Ren <jack.ren@intel.com>
Author-tracking-BZ: 32421
Diffstat (limited to 'media/libstagefright/FLACExtractor.cpp')
-rw-r--r-- | media/libstagefright/FLACExtractor.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/media/libstagefright/FLACExtractor.cpp b/media/libstagefright/FLACExtractor.cpp index 89a91f7..c79180b 100644 --- a/media/libstagefright/FLACExtractor.cpp +++ b/media/libstagefright/FLACExtractor.cpp @@ -845,12 +845,14 @@ bool SniffFLAC( { // first 4 is the signature word // second 4 is the sizeof STREAMINFO + // 1st bit of 2nd 4 bytes represent whether last block of metadata or not // 042 is the mandatory STREAMINFO // no need to read rest of the header, as a premature EOF will be caught later uint8_t header[4+4]; if (source->readAt(0, header, sizeof(header)) != sizeof(header) - || memcmp("fLaC\0\0\0\042", header, 4+4)) - { + || memcmp("fLaC", header, 4) + || !(header[4] == 0x80 || header[4] == 0x00) + || memcmp("\0\0\042", header + 5, 3)) { return false; } |