summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/SampleTable.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't initialize sync sample parameters until the endMarco Nelissen2017-03-221-9/+12
| | | | | | | | | | | | | to avoid leaving them in a partially initialized state. Bug: 33137046 Test: ran CTS tests CVE-2017-0483 Change-Id: I1f5c070233c5917d85da9e930e01a3fc51a0a0ec (cherry picked from commit a9660fe122ca382e1777e0c5d3c42ca67ffb0377) (cherry picked from commit bc62c086e9ba7530723dc8874b83159f4d77d976)
* Merge tag 'android-6.0.1_r66' into HEADJessica Wagantall2016-09-071-35/+137
|\ | | | | | | | | | | Android 6.0.1 release 66 Change-Id: I1d3eb6b66b7482149fe93647c278065fa46dc518
| * DO NOT MERGE - stagefright: fix integer overflow errorWonsik Kim2016-08-011-14/+15
| | | | | | | | | | | | Bug: 30103394 Change-Id: If449d3e30a0bf2ebea5317f41813bfed094f7408 (cherry picked from commit 2c74a3cd5d1d66b9a35424b9c4443dafa6db5bef)
| * Impose a size bound for dynamically allocated tables in stbl.Pawin Vongmasa2016-07-201-24/+126
| | | | | | | | | | | | | | | | | | | | Impose a restriction of 200MiB for tables in stsc, stts, ctts and stss boxes. Also change mTimeToSample from Vector to array. Bug: 29367429 Change-Id: I953bea9fe0590268cf27376740f582dc88563d42 Merge conflict resolution of ag/1170200 to mnc-mr2-release
* | Merge tag 'android-6.0.1_r46' into HEADJessica Wagantall2016-06-071-16/+22
|\ \ | |/ | | | | | | | | Android 6.0.1 release 46 Change-Id: I4fcabf5775aebd2cb8dc0e352d1b1460d3214573
| * SampleTable.cpp: Fixed a regression caused by a fix for bugPawin Vongmasa2016-04-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 28076789. Detail: Before the original fix (Id207f369ab7b27787d83f5d8fc48dc53ed9fcdc9) for 28076789, the code allowed a time-to-sample table size to be 0. The change made in that fix disallowed such situation, which in fact should be allowed. This current patch allows it again while maintaining the security of the previous fix. Bug: 28288202 Bug: 28076789 Change-Id: I1c9a60c7f0cfcbd3d908f24998dde15d5136a295
| * Resolve merge conflict when cp'ing ag/931301 to mnc-mr1-releaseZach Jang2016-04-211-17/+20
| | | | | | | | Change-Id: I079d1db2d30d126f8aed348bd62451acf741037d
* | Fix 64-bit comparisonMarco Nelissen2016-03-221-1/+6
| | | | | | | | | | | | | | A 64-bit SIZE_MAX value cast to off64_t is always negative, causing valid files to be rejected in 64-bit mode. Change-Id: I8f61c19951f9c73292fa917081b8b2f3bfc405a0
* | Revert "Fixed comparison on 64 bit system"Keith Mok2016-03-221-1/+1
| | | | | | | | | | | | | | | | AOSP has a different fix. This reverts commit 65890a73d53a25b0809b22e41cdee19e3f4aa68d. Change-Id: I88fc05c791b9d5cef181e94d1cd3c40f0076f827
* | Fixed comparison on 64 bit systemKeith Mok2015-12-041-1/+1
| | | | | | | | | | | | | | | | Fixed comparison in setSampleToChunkParams which return false since SIZE_MAX in 64 bit system is 18446744073709551615, but off64_t is signed. Change-Id: Idba6b94e2dbdcc34ced98a5f926f1b5e0b6cf5cb
* | Fix overflow check so it doesn't reject legitimate filesMarco Nelissen2015-11-291-1/+1
| | | | | | | | Change-Id: Id2a25af287f2d06755ebdf133fcea166a6767a27
* | Fixed comparison so that both operands are treated as 64 bit.Dan Austin2015-11-051-1/+1
| | | | | | | | | | | | | | Fixed comparison in setSampleToChunkParams so that both operands are treated as 64-bit to address build breakage. Change-Id: I4b2bc52e9fc61b7e00898928a09e134e88b179f9
* | Fixed benign overflows triggered by tests CVE-2015-1538-1 andDan Austin2015-11-051-4/+9
|/ | | | | | | CVE-2015-1538-2 in CTS. Bug: 25016754 Change-Id: I0ceb2c799899015be6b37d5e94fe306d0037a8d2
* libstagefright: fix handling of mSampleTimeEntries and mNumSampleSizes in ↵Wei Jia2015-08-181-1/+13
| | | | | | | SampleTable. Bug: 23247055 Change-Id: I29ef59c7ff09248063714e5013f7c33f66c5eebd
* libstagefright: fix possible overflow in SampleTable.cppWei Jia2015-08-171-2/+2
| | | | | Bug: 23197952 Change-Id: I83afe5aad74a41102b127c4e46799ebc317cd96c
* SampleTable: fix integer overflow checks.Wei Jia2015-06-041-2/+2
| | | | | Bug: 20139950 Change-Id: I6f4e3d4c734872074475d9346ed692a4baf77d79
* stagefright: warnings be gone, some are now errors, use clangLajos Molnar2015-04-171-1/+1
| | | | Change-Id: I81f438ae444f04c12ae27ae4ef6d073033de172c
* Fix integer overflow during MP4 atom processingJoshua J. Drake2015-04-091-0/+3
| | | | | | | | | | A few sample table related FourCC values are handled by the setSampleToChunkParams function. An integer overflow exists within this function. Validate that mNumSampleToChunkOffets will not cause an integer overflow. Bug: 20139950 Change-Id: I1972cc185fce5e058afa143ad5eabcc269ad324d
* Detect allocation failures and bail gracefullyJoshua J. Drake2015-04-091-5/+16
| | | | | | | | | | During the processing of several sample table related MP4 atoms, allocation sizes could be large enough cause a std::bad_alloc exception to be raised. This typically causes a crash (denial of service condition). Use std::nothrow to catch allocation failures and return gracefully. Bug: 20139950 Change-Id: I03d3f01b24e5fe3fa38985914bcfa694ea3dc09e
* Fix several ineffective integer overflow checksJoshua J. Drake2015-04-091-3/+3
| | | | | | | | | | | Commit edd4a76 (which addressed bugs 15328708, 15342615, 15342751) added several integer overflow checks. Unfortunately, those checks fail to take into account integer promotion rules and are thus themselves subject to an integer overflow. Cast the sizeof() operator to a uint64_t to force promotion while multiplying. Bug: 20139950 Change-Id: Ieb29a170edb805c722fc5658935f2390003e5260
* SampleTable: check integer overflow during table allocRobert Shih2014-07-281-0/+14
| | | | | | | Bug: 15328708 Bug: 15342615 Bug: 15342751 Change-Id: I6bb110a1eba46506799c73be8ff9a4f71c7e7053
* stagefright: handle seeking to before first cue-point.Lajos Molnar2014-07-211-8/+8
| | | | | Bug: 16446994 Change-Id: Id3f9d6780a7c4f62171cbfa8675a67334e8dfa10
* stagefright: Fix seeking in MPEG4 containerLajos Molnar2014-07-171-112/+77
| | | | | | | | - seek based on user-visible timestamp - seek to previous, next and closest exactly Bug: 12786906 Change-Id: I2d5e1fbff6469b6f081a284be2222a4cb50aa754
* Expose sample duration in MPEG4Extractor.Robert Shih2014-04-251-1/+6
| | | | | Bug: 12782113 Change-Id: I75ee361243c5382d9288349c554deb7bed952782
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-1/+1
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-041-1/+1
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Fix for 5754998 testPerformanceTransitionWithEffectOverlapping test failed.Hong Teng2011-12-161-0/+7
| | | | | | | | -Fix the index is out of sync frame array boundary when seeking to end of a 3gp file. Validation only were done for video editor cts test and Movie Studio application. Futher validation may include media player, youtube application,.etc. Change-Id: Ib01314f1768cfab702dbe25c307553ace0b85e77
* Use binary search to discover closest sync sample index, replaceAndreas Huber2011-11-071-24/+25
| | | | | | | | assertions with runtime errors in case the file's table of sync sample indices is not sorted properly. Change-Id: Ie4446a44e613a8d329ac680c37361d4407d22520 related-to-bug: 5549855
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-1/+1
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Remove an O(n^2) algorithm in MPEG4Extractor.cpp to speed up seeks in long ↵Andreas Huber2011-09-191-21/+80
| | | | | | | | | streams containing B-frames. Change-Id: Ie4dc734d2c2d5a5ce84674bb883f4b27e2278642 related-to-bug: 5336497
* Make sure we have all the sample table metadata before declaring a track valid.Andreas Huber2011-08-171-0/+7
| | | | | Change-Id: I2dfbc3e6017b5cd264e4cccfa47d19047b2e7f31 related-to-bug: 5178976
* Don't assert on malformed .mp4 content that contains fewer samples thanAndreas Huber2011-06-211-4/+8
| | | | | | | described in the time-to-sample box. Change-Id: Ic6f973212c15012a25f6e849759fd4f14d97e30f related-to-bug: 4779053
* A fix to the MPEG4Extractor to support 16-bit sample sizes.Andreas Huber2011-05-121-1/+1
| | | | Change-Id: Ic531f1ff0dd171f6f14aaad56aacbf3952a3aeae
* Fix omx_tests to no longer refer to test files that are no longer available.Andreas Huber2011-04-271-0/+4
| | | | | | Also make sure that a seek beyond EOF does not just seek the final syncframe. Change-Id: I0a58490ef719ce095a94f1d6909c60eb20074a0b
* Remove streamability verification, it's taking too long. Also...Andreas Huber2011-04-151-47/+112
| | | | | | | | make sure that findSampleAtTime uses composition time instead of decoding time, at the expense of extra memory. Change-Id: I67d09389b3df7ed265f614bdd0b142ca7f19f86a related-to-bug: 4294536
* Make sure timestamps attached to encoded media are composition timestamps.Andreas Huber2011-02-031-0/+73
| | | | | | | | not decoding timestamps. Obviously there is no difference between them if the content in question does not involve frame reordering. Change-Id: Iac4d06cfeb8a136f735c1148e98cac340d3ef893 related-to-bug: 3398314
* Fixed an issue in SampleTable where the table index was incorrectly wrapped ↵James Dong2010-11-211-1/+3
| | | | | | | | around to -1 bug - 3198642 Change-Id: Ia0544172502fc771f48fce22d5c1db19ac3554bb
* 64-bit file size/offset support for media frameworkJames Dong2010-11-181-6/+6
| | | | Change-Id: I3452bc2c0f1d990cc67285df2fce1f9f86ff8e10
* Remove annoying warning during mpeg4 extraction.Andreas Huber2010-10-271-1/+1
| | | | | Change-Id: Iffadeefb43bab6da1299b0a0582d6c6990156c32 related-to-bug: 3093774
* Support for communicating if a buffer read from the _extractor_ is a sync ↵Andreas Huber2010-08-061-31/+45
| | | | | | | sample or not. Change-Id: Ie71506224d937cfff1fa1273bfac31c47db8845f related-to-bug: 2900534
* Support finer seek control on MediaSources.Andreas Huber2010-07-211-17/+137
| | | | | | related-to-bug: 2858448 Change-Id: Ifb4b13b990fd5889113e47e2c62249ac43391fa1
* Squashed commit of the following:Andreas Huber2010-01-191-244/+79
| | | | | | | | | | | | | | commit 6689350d7e4dad6d873c1ed95f0a356e3bfd79d1 Author: Andreas Huber <andih@google.com> Date: Tue Jan 19 09:23:02 2010 -0800 Some tweaks to the SampleIterator. commit 5638bff6d31442a219806445c3106d47b081fcab Author: Andreas Huber <andih@google.com> Date: Fri Jan 15 14:46:29 2010 -0800 A much improved implementation of MPEG4 sample table operations through an iterator.
* Fix a few issues with determining the closest sample to a given time in the ↵Andreas Huber2010-01-141-5/+19
| | | | MPEG4 sampletable implementation.
* New API to instantiate a MediaExtractor given a URI and optional MIME type.Andreas Huber2009-10-231-15/+15
| | | | | | Also DataSources now must provide a method initCheck() and DataSource::reat_at has been renamed to readAt to conform to standard API naming guidelines.
* Extract video thumbnails from the largest sync sample among the first 20.Andreas Huber2009-10-221-0/+47
| | | | Also fixes OMXCodec seek behaviour on the very first call to OMXCodec::read()
* Separated private from public header files.Andreas Huber2009-10-131-1/+2
|
* Fix various compiler warnings accumulated over time.Andreas Huber2009-10-131-5/+5
|
* Fix a typo.Andreas Huber2009-08-271-1/+1
|
* assert => CHECK in stagefright.Andreas Huber2009-08-261-25/+5
|
* Squashed commit of the following:Andreas Huber2009-08-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 5bb012f0065f7ffaaeb4f569d71f0e3a8d6b19c3 Author: Andreas Huber <andih@google.com> Date: Fri Aug 14 10:40:08 2009 -0700 An attempt at fixing export using the qcom encoders. More quirks. commit 0690e76bfa48118a68287ccf1bbfa82febaa620c Author: Andreas Huber <andih@google.com> Date: Fri Aug 14 09:08:28 2009 -0700 Callbacks are now dispatched from a separate thread in OMX. commit c6571a039526df29b6343f9a1971dbc019088c61 Author: Andreas Huber <andih@google.com> Date: Thu Aug 13 15:42:25 2009 -0700 Massive API changes throughout stagefright, smart pointers everywhere. commit 900612af6a0555664d9ba195112cd859491265f4 Author: Andreas Huber <andih@google.com> Date: Thu Aug 13 13:33:12 2009 -0700 OMXCodecs now properly shutdown. commit 96732f05e1b0603dcd1b11f16a23512592eeb4f5 Author: Andreas Huber <andih@google.com> Date: Thu Aug 13 12:04:04 2009 -0700 More work on JPEG decoding using the hardware OMX component. commit 63839a073ac393e3a130434ba467969053b694ad Author: Andreas Huber <andih@google.com> Date: Wed Aug 12 13:13:31 2009 -0700 An attempt to drive the JPEG decoder OMX node. commit 3ac2fe5ab2926eda81b2123610b2434c645294ff Author: Andreas Huber <andih@google.com> Date: Tue Aug 11 16:38:21 2009 -0700 Renamed StateMachine to OMXCodec and put it in its proper place. commit 247da75a96bf8881956413023dd49a84d5b4f5b2 Author: Andreas Huber <andih@google.com> Date: Tue Aug 11 16:06:19 2009 -0700 Statemachine is now a full-fledged MediaSource. commit 045244f6771fa0b9b329495c953afda900a84b71 Author: Andreas Huber <andih@google.com> Date: Fri Aug 7 09:16:54 2009 -0700 Properly setup the input format when exporting to AMR audio. commit 271b984cb32c5cd9e46e3f90ae121f334e4b8da9 Author: Andreas Huber <andih@google.com> Date: Thu Aug 6 09:59:38 2009 -0700 Added some code to test audio encoding to the OMX harness. commit 79af4748e4af33bd66d3fbac606e332a69741cf4 Author: Andreas Huber <andih@google.com> Date: Wed Aug 5 14:36:22 2009 -0700 Merge the old OMXDecoder and the new, shiny, StateMachine code. commit 91cf5dd77a8762bc10a0b2ffce35e3bbeb262231 Author: Andreas Huber <andih@google.com> Date: Tue Aug 4 17:41:43 2009 -0700 A new harness to test OMX node compliance (and quirks).