summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MPEG4Extractor.cpp
Commit message (Collapse)AuthorAgeFilesLines
* DO NOT MERGE Fix divide by zeroMarco Nelissen2016-12-121-5/+18
| | | | | | | | | | and be stricter about the layout of various boxes in mp4 files. CYNGNOS-3312 Bug: 31318219 Change-Id: I50034d5b6b1967ca6e88aabeacf49f26ba3c0d32 (cherry picked from commit 2e211d38a3124849ef46376256d01e69549c422f) (cherry picked from commit d4eb1e1ca163d6ab0eaf0d80ca138f851f87c3d2)
* Merge tag 'android-6.0.1_r74' into HEADJessica Wagantall2016-11-091-0/+13
|\ | | | | | | | | | | | | | | CYNGNOS-3303 Android 6.0.1 release 74 Change-Id: I0a14578751f4ecb8d13def26b9ffe5dcba4afd72
| * Limit mp4 atom size to something reasonableMarco Nelissen2016-09-271-0/+13
| | | | | | | | | | | | Bug: 28615448 Change-Id: I5916f6839b4a9bbee4388a106e7373bcd4154f5a (cherry picked from commit cb898dca47ac03738db91ddc371207435d2a1526)
* | Merge remote-tracking branch 'remotes/android-6.0.1_r52' into HEADJessica Wagantall2016-07-071-1/+26
|\ \ | |/ | | | | | | | | Ticket: CYNGNOS-3020 Change-Id: I7e8d69c5f7041b66893ea643c4bc19c3b7bcdda5
| * MPEG4Extractor: ensure kKeyTrackID exists before creating an MPEG4Source as ↵Wei Jia2016-05-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | track. GenericSource: return error when no track exists. SampleIterator: make sure mSamplesPerChunk is not zero before using it as divisor. Bug: 21657957 Bug: 23705695 Bug: 22802344 Bug: 28799341 Change-Id: I7664992ade90b935d3f255dcd43ecc2898f30b04 (cherry picked from commit 0386c91b8a910a134e5898ffa924c1b6c7560b13)
| * Check malloc result to avoid NPDMarco Nelissen2016-05-271-0/+18
| | | | | | | | | | Bug: 28471206 Change-Id: Id5d055d76893d6f53a2e524ff5f282d1ddca3345
| * Also fix out of bounds access for normal readMarco Nelissen2016-02-261-1/+9
| | | | | | | | | | | | | | Previous fix accidentally only fixed the fragmented read case. Bug: 27208621 Change-Id: Ie16f1920b84c8aba613842659238fcd5925694ad
* | Merge tag 'android-6.0.1_r24' into HEADJessica Wagantall2016-04-051-1/+9
|\ \ | | | | | | | | | | | | Ticket: CYNGNOS-2213 Android 6.0.1 release 24
| * | Also fix out of bounds access for normal readMarco Nelissen2016-03-011-1/+9
| | | | | | | | | | | | | | | | | | | | | Previous fix accidentally only fixed the fragmented read case. Bug: 27208621 Change-Id: Ie16f1920b84c8aba613842659238fcd5925694ad
| * | Fix out-of-bounds write am: 5403587a74 am: fb2eb86102 am: e6bd186c7e am: ↵Marco Nelissen2016-01-121-1/+9
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a8ac8f617b am: e2e46f5fa1 am: 2304c606eb am: 0945199000 am: a39f981875 * commit 'a39f9818759155a2651995d6844f9821d83e3f0d': Fix out-of-bounds write
| | * \ Fix out-of-bounds write am: 5403587a74 am: fb2eb86102 am: e6bd186c7e am: ↵Marco Nelissen2016-01-121-1/+9
| | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a8ac8f617b am: e2e46f5fa1 am: 2304c606eb am: 0945199000 * commit '0945199000aaa5a628705de69f17d28a5c04cc36': Fix out-of-bounds write
| | | * \ Fix out-of-bounds write am: 5403587a74 am: fb2eb86102 am: e6bd186c7e am: ↵Marco Nelissen2016-01-121-1/+9
| | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a8ac8f617b am: e2e46f5fa1 am: 2304c606eb * commit '2304c606eb2eb9e6f21fcca0e6dcd4ac8156779a': Fix out-of-bounds write
| | | | * \ Fix out-of-bounds write am: 5403587a74 am: fb2eb86102 am: e6bd186c7eMarco Nelissen2016-01-121-1/+9
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: a8ac8f617b * commit 'a8ac8f617b2df8f07935d3e1e47189dee2381b88': Fix out-of-bounds write
| | | | | * \ Fix out-of-bounds write am: 5403587a74Marco Nelissen2016-01-121-1/+9
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: fb2eb86102 * commit 'fb2eb8610208d3ad2ea69f57a151ffe436c6c6e6': Fix out-of-bounds write
| | | | | | * \ Fix out-of-bounds writeMarco Nelissen2016-01-121-1/+9
| | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | am: 5403587a74 * commit '5403587a74aee2fb57076528c3927851531c8afb': Fix out-of-bounds write
| | | | | | | * | Fix out-of-bounds writeMarco Nelissen2016-01-121-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 26365349 Change-Id: Ia363d9f8c231cf255dea852e0bbf5ca466c7990b
| | | * | | | | | Merge "stagefright: MPEG4Extractor: allow \'hdlr\' box before first track" ↵Jon Larimer2015-10-211-1/+3
| | | |\ \ \ \ \ \ | | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into klp-dev am: b1a13d01dc am: 781cd4f37d am: 8565726f57 am: b44e95da77 am: 699e9b0749 am: 8e4f53159c * commit '8e4f53159c64996e1617ec589977c290fa233010': stagefright: MPEG4Extractor: allow 'hdlr' box before first track
| | | | * | | | | Merge "stagefright: MPEG4Extractor: allow \'hdlr\' box before first track" ↵Jon Larimer2015-10-211-1/+3
| | | | |\ \ \ \ \ | | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into klp-dev am: b1a13d01dc am: 781cd4f37d am: 8565726f57 am: b44e95da77 * commit 'b44e95da772bb26fa9fc4cdc04cf51b7d42344ae': stagefright: MPEG4Extractor: allow 'hdlr' box before first track
| | | | | * | | | Merge "stagefright: MPEG4Extractor: allow \'hdlr\' box before first track" ↵Jon Larimer2015-10-201-1/+3
| | | | | |\ \ \ \ | | | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into klp-dev am: b1a13d01dc am: 781cd4f37d * commit '781cd4f37d4b81a8e5af45a3ba6cdd4cdd209a3e': stagefright: MPEG4Extractor: allow 'hdlr' box before first track
| | | | | | * | | Merge "stagefright: MPEG4Extractor: allow \'hdlr\' box before first track" ↵Jon Larimer2015-10-201-1/+3
| | | | | | |\ \ \ | | | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into klp-dev am: b1a13d01dc * commit 'b1a13d01dccbc48ea54aeb4a4ba7fce636ff1daa': stagefright: MPEG4Extractor: allow 'hdlr' box before first track
| | | | | | | * | Merge "stagefright: MPEG4Extractor: allow 'hdlr' box before first track" ↵Jon Larimer2015-10-201-1/+3
| | | | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into klp-dev
| | | | | | | | * | stagefright: MPEG4Extractor: allow 'hdlr' box before first trackLajos Molnar2015-10-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 21725583 Change-Id: I799c1967759c7e49fb50281a1708188450caac77 (cherry picked from commit cf75af8f76265fb2909028f5dc68c7029dbe5f49)
* | | | | | | | | | MPEG4Extractor: cast media time to int64_t in order to avoid check on ↵Wei Jia2016-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unsigned integer overflow. Change-Id: Iad5ae41f0bbfc5e837b4b78e8acaa3f9462329e6
* | | | | | | | | | MPEG4Extractor: still more NULL dereference fixesJoshua J. Drake2016-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When processing various FourCC values within MP4 media, mLastTrack is accessed without first ensuring that a track has been encoutered. Check for NULL and bail out instead of crashing. Bug: 20139950 Change-Id: Ie16687024d17348f576a0e13bd60bd4d6898de91
* | | | | | | | | | Merge tag 'android-6.0.1_r17' into HEADJessica Wagantall2016-03-071-1/+9
|\ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 6.0.1 release 17 Ticket: CYNGNOS-1854
| * | | | | | | | | Fix out-of-bounds writeMarco Nelissen2016-01-221-1/+9
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 26365349 Change-Id: Ia363d9f8c231cf255dea852e0bbf5ca466c7990b
| * | | | | | | | Fix offset adjustment when skipping off-spec meta chunkMarco Nelissen2015-10-221-3/+3
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 25172843 Change-Id: Ibbfe4369176f2a367eab5a39fd742f425b017288
* | | | | | | | stagefright: Don't crash on invalid / null AVCC atoms in MKVSteve Kondik2016-03-011-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Seen in the wild. If a file contains an invalid track, skip it. * Also correct AVCC atom size check in Matroska extractor. REF: CYNGNOS-2168 Change-Id: I589aadbd689c9a00e1dca613e61fcec5b06ed69a
* | | | | | | | stagefright: Fix tags in mpeg4 not parsed correctly.Keith Mok2015-11-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes a bug introduced by commit 440b54cbef4a20caeb18bf6927bc728645f649e2 which skipped the atoms inside in mpeg4 container without correctly parsing all of it. Change-Id: I6152b0a8e0248a39f9c686e748b3ae22457579da
* | | | | | | | libstagefright: Handle MPEG4 DP playbackLeena Winterrowd2015-11-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the HW decoder doesn't support MPEG4 DP clips, detect DP format clips in the parser and report a new MIME: video/mpeg4-esdp. This MIME is only registered to the SW decoder which supports DP clips. Merges the following change from kitkat: libstagefright: Fix DP Parsing issue with mpeg4 SP,ASP (Change-Id: I69c719011e1a0d2a0b0ae5a9b504b7cce443866b) CRs-Fixed: 722066 Change-Id: I7bc3a7a9f4a6d37e046ed9c8008cb27fb3bc665d
* | | | | | | | libstagefright: Added mime-types for enca/encv atomsManikanta Kanamarlapudi2015-11-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - enca/encv are encrypted audio and video atoms for mp4a and mp4v. Hence returning aac and mpeg4 mime-types for enca and encv. CRs-Fixed: 578506 Change-Id: Ie568ea7eec73e110eef07e2b1b921afefc8c54a7
* | | | | | | | Fix offset adjustment when skipping off-spec meta chunkMarco Nelissen2015-11-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 25172843 Change-Id: Ibbfe4369176f2a367eab5a39fd742f425b017288
* | | | | | | | Merge tag 'android-6.0.0_r26' into cm-13.0Ricardo Cerqueira2015-11-051-2/+15
|\ \ \ \ \ \ \ \ | |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android 6.0.0 release 26 Change-Id: I8a57007bf6efcd8b95c3cebf5e0444345bdd4cda
| * | | | | | | am f1790258: am 5e92fded: am 64cdd5f2: am f2cf2bd7: am 07395f4c: am ↵Marco Nelissen2015-10-061-2/+9
| |\ \ \ \ \ \ \ | | |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 00f5fa82: am 74d1927e: Merge "Check NAL size before use" into klp-dev * commit 'f1790258494751adc629126666e7dd81bbc8afbd': Check NAL size before use
| | * | | | | | am 5e92fded: am 64cdd5f2: am f2cf2bd7: am 07395f4c: am 00f5fa82: am ↵Marco Nelissen2015-10-061-2/+9
| | |\ \ \ \ \ \ | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 74d1927e: Merge "Check NAL size before use" into klp-dev * commit '5e92fdede2391b77cff5fe914d748e1023d0ef90': Check NAL size before use
| | | * | | | | am f2cf2bd7: am 07395f4c: am 00f5fa82: am 74d1927e: Merge "Check NAL size ↵Marco Nelissen2015-10-061-2/+9
| | | |\ \ \ \ \ | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | before use" into klp-dev * commit 'f2cf2bd7448734c6881e3bea2b758f2bf9feeed9': Check NAL size before use
| | | | * | | | am 00f5fa82: am 74d1927e: Merge "Check NAL size before use" into klp-devMarco Nelissen2015-10-061-2/+9
| | | | |\ \ \ \ | | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | * commit '00f5fa82d884c0ca41ee08e7a67ab54238109083': Check NAL size before use
| | | | | * | | am 74d1927e: Merge "Check NAL size before use" into klp-devMarco Nelissen2015-10-061-2/+9
| | | | | |\ \ \ | | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | * commit '74d1927e4122a1748f89ca2ef79406fc06ee94b2': Check NAL size before use
| | | | | | * | Merge "Check NAL size before use" into klp-devMarco Nelissen2015-10-061-2/+9
| | | | | | |\ \
| | | | | | | * | Check NAL size before useMarco Nelissen2015-10-061-2/+9
| | | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 24441553 Bug: 24445122 Change-Id: Ib7f025769adbafd5a2cb64fae5562a0a565945c2
| | * | | | | | am 3674abc0: am fb0d63df: am 62d89908: am df68d9d5: am 60b25aa0: am ↵Wei Jia2015-10-061-0/+6
| | |\ \ \ \ \ \ | | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9ab9c85e: Merge "MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData." into klp-dev * commit '3674abc050997e664c3906b8507d9d4b63d52e9d': MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData.
| | | * | | | | am 62d89908: am df68d9d5: am 60b25aa0: am 9ab9c85e: Merge "MPEG4Extractor: ↵Wei Jia2015-10-061-0/+6
| | | |\ \ \ \ \ | | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ensure buffer size is not less than 8 for LastCommentData." into klp-dev * commit '62d89908f6c7e3da9dac36aa439ceb1c2522b86d': MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData.
| | | | * | | | am 60b25aa0: am 9ab9c85e: Merge "MPEG4Extractor: ensure buffer size is not ↵Wei Jia2015-10-061-0/+6
| | | | |\ \ \ \ | | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | less than 8 for LastCommentData." into klp-dev * commit '60b25aa0c173854593743dd85588c7449baf87c0': MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData.
| | | | | * | | am 9ab9c85e: Merge "MPEG4Extractor: ensure buffer size is not less than 8 ↵Wei Jia2015-10-061-0/+6
| | | | | |\ \ \ | | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | for LastCommentData." into klp-dev * commit '9ab9c85e39f089f355faa9cd9db6d113dc482e61': MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData.
| | | | | | * | MPEG4Extractor: ensure buffer size is not less than 8 for LastCommentData.Wei Jia2015-10-061-0/+6
| | | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 24346430 Change-Id: I897a724e968841d9160f819d06c0ce22f6d743c4 (cherry picked from commit 5cae16bdce77b0a3ba590b55637f7d55a2f35402)
| | * | | | | am 2c02f5ee: am 719cd33e: am 492bba08: am d18bb120: am 09f71c56: am ↵Marco Nelissen2015-08-241-4/+12
| | |\ \ \ \ \ | | | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dedaca6f: Limit allocations to avoid out-of-memory * commit '2c02f5eeec639825ece4acbca0d1969da192dca0': Limit allocations to avoid out-of-memory
| | | * | | | am 492bba08: am d18bb120: am 09f71c56: am dedaca6f: Limit allocations to ↵Marco Nelissen2015-08-231-4/+12
| | | |\ \ \ \ | | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | avoid out-of-memory * commit '492bba08202a601e96a13b26422c85b3fb1a5ee0': Limit allocations to avoid out-of-memory
| | | | * | | am 09f71c56: am dedaca6f: Limit allocations to avoid out-of-memoryMarco Nelissen2015-08-231-4/+12
| | | | |\ \ \ | | | | | |/ / | | | | | | | | | | | | | | | | | | | | | * commit '09f71c5621799e0f030b4a8058d2fb4df5977de0': Limit allocations to avoid out-of-memory
| | | | | * | am dedaca6f: Limit allocations to avoid out-of-memoryMarco Nelissen2015-08-231-4/+12
| | | | | |\ \ | | | | | | |/ | | | | | | | | | | | | | | | | | | | | | * commit 'dedaca6f04ac9f95fabe3b64d44cd1a2050f079e': Limit allocations to avoid out-of-memory
| | | | | | * Limit allocations to avoid out-of-memoryMarco Nelissen2015-08-211-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Corrupt files could cause very large allocations, limit them to something more reasonable. Bug: 17769851 Change-Id: Ib0f722fd6fddff873bd7a547aac456e608c34c84