summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-12-07 18:45:35 -0800
committerSteve Kondik <steve@cyngn.com>2015-12-07 18:45:35 -0800
commit697a7ab8c538ca84a92b605e50824da1cbf9b466 (patch)
treefe32b5c0b8e0fa115cd6358c5428b8a48e285dec /include
parent7f8512331f105565054202486fa0a6094ad693c1 (diff)
parent5dc9ffe50ef517591b8ffad66c7e4d6ec82b8b4b (diff)
downloadframeworks_av-697a7ab8c538ca84a92b605e50824da1cbf9b466.zip
frameworks_av-697a7ab8c538ca84a92b605e50824da1cbf9b466.tar.gz
frameworks_av-697a7ab8c538ca84a92b605e50824da1cbf9b466.tar.bz2
Merge tag 'android-6.0.1_r3' of https://android.googlesource.com/platform/frameworks/av into cm-13.0
Android 6.0.1 release 3 Change-Id: I2f2a1fe1b58c828e8341556996211562d6e195ab
Diffstat (limited to 'include')
-rw-r--r--include/media/stagefright/MediaCodec.h5
-rw-r--r--include/media/stagefright/MediaCodecList.h4
2 files changed, 8 insertions, 1 deletions
diff --git a/include/media/stagefright/MediaCodec.h b/include/media/stagefright/MediaCodec.h
index 9c489e5..e2588a4 100644
--- a/include/media/stagefright/MediaCodec.h
+++ b/include/media/stagefright/MediaCodec.h
@@ -178,7 +178,7 @@ protected:
private:
// used by ResourceManagerClient
- status_t reclaim();
+ status_t reclaim(bool force = false);
friend struct ResourceManagerClient;
private:
@@ -387,6 +387,9 @@ private:
uint64_t getGraphicBufferSize();
void addResource(const String8 &type, const String8 &subtype, uint64_t value);
+ bool hasPendingBuffer(int portIndex);
+ bool hasPendingBuffer();
+
/* called to get the last codec error when the sticky flag is set.
* if no such codec error is found, returns UNKNOWN_ERROR.
*/
diff --git a/include/media/stagefright/MediaCodecList.h b/include/media/stagefright/MediaCodecList.h
index 3aaa032..bf4db87 100644
--- a/include/media/stagefright/MediaCodecList.h
+++ b/include/media/stagefright/MediaCodecList.h
@@ -47,6 +47,10 @@ struct MediaCodecList : public BnMediaCodecList {
virtual size_t countCodecs() const;
virtual sp<MediaCodecInfo> getCodecInfo(size_t index) const {
+ if (index >= mCodecInfos.size()) {
+ ALOGE("b/24445127");
+ return NULL;
+ }
return mCodecInfos.itemAt(index);
}