summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/MediaCodec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'media/libstagefright/MediaCodec.cpp')
-rw-r--r--media/libstagefright/MediaCodec.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/media/libstagefright/MediaCodec.cpp b/media/libstagefright/MediaCodec.cpp
index 45e9a79..b6bea65 100644
--- a/media/libstagefright/MediaCodec.cpp
+++ b/media/libstagefright/MediaCodec.cpp
@@ -872,6 +872,8 @@ status_t MediaCodec::getBufferAndFormat(
}
*format = info.mFormat;
}
+ } else {
+ return BAD_INDEX;
}
return OK;
}
@@ -988,6 +990,9 @@ bool MediaCodec::handleDequeueOutputBuffer(const sp<AReplyToken> &replyID, bool
if (omxFlags & OMX_BUFFERFLAG_EXTRADATA) {
flags |= BUFFER_FLAG_EXTRADATA;
}
+ if (omxFlags & OMX_BUFFERFLAG_DATACORRUPT) {
+ flags |= BUFFER_FLAG_DATACORRUPT;
+ }
response->setInt32("flags", flags);
response->postReply(replyID);
@@ -2635,6 +2640,9 @@ void MediaCodec::onOutputBufferAvailable() {
if (omxFlags & OMX_BUFFERFLAG_EOS) {
flags |= BUFFER_FLAG_EOS;
}
+ if (omxFlags & OMX_BUFFERFLAG_DATACORRUPT) {
+ flags |= BUFFER_FLAG_DATACORRUPT;
+ }
msg->setInt32("flags", flags);