summaryrefslogtreecommitdiffstats
path: root/media/libstagefright/codecs/avc
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-09-04 13:46:11 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-09-04 13:46:11 +0000
commit8e2ad94c2f859988759629d813e0394d452e9fc6 (patch)
treeb5f77c776de18c781c38f6dd91912081e736f4e8 /media/libstagefright/codecs/avc
parent1830c7015989a10a803ebff8d710c2655ec9d81d (diff)
parent13006b9d0586d17a0ea52e98124b54ebf6246feb (diff)
downloadframeworks_av-8e2ad94c2f859988759629d813e0394d452e9fc6.zip
frameworks_av-8e2ad94c2f859988759629d813e0394d452e9fc6.tar.gz
frameworks_av-8e2ad94c2f859988759629d813e0394d452e9fc6.tar.bz2
am 13006b9d: am 032ecb7f: Merge "Fix in SoftAVCEncoder plugin"
* commit '13006b9d0586d17a0ea52e98124b54ebf6246feb': Fix in SoftAVCEncoder plugin
Diffstat (limited to 'media/libstagefright/codecs/avc')
-rw-r--r--media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
index e783540..8aff5b6 100644
--- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
@@ -825,9 +825,10 @@ void SoftAVCEncoder::onQueueFilled(OMX_U32 /* portIndex */) {
videoInput.coding_timestamp = (inHeader->nTimeStamp + 500) / 1000; // in ms
uint8_t *inputData = NULL;
if (mStoreMetaDataInBuffers) {
- if (inHeader->nFilledLen != 8) {
+ if (inHeader->nFilledLen != (sizeof(OMX_U32) + sizeof(buffer_handle_t))) {
ALOGE("MetaData buffer is wrong size! "
- "(got %u bytes, expected 8)", inHeader->nFilledLen);
+ "(got %u bytes, expected %d)", inHeader->nFilledLen,
+ sizeof(OMX_U32) + sizeof(buffer_handle_t));
mSignalledError = true;
notify(OMX_EventError, OMX_ErrorUndefined, 0, 0);
return;
@@ -992,7 +993,7 @@ uint8_t *SoftAVCEncoder::extractGrallocData(void *data, buffer_handle_t *buffer)
kMetadataBufferTypeGrallocSource, type);
return NULL;
}
- buffer_handle_t imgBuffer = *(buffer_handle_t*)((uint8_t*)data + 4);
+ buffer_handle_t imgBuffer = *(buffer_handle_t*)((uint8_t*)data + sizeof(OMX_U32));
const Rect rect(mVideoWidth, mVideoHeight);
uint8_t *img;