summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-09-04 13:25:36 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-09-04 13:25:37 +0000
commit032ecb7f233f392e6e68f030bf72a9bc7c861d11 (patch)
treeb152750bae25243835c80901d2726d12b3e8c4fa /media
parent45d2c7e1809e41e3d022f037aeec7e38646f6072 (diff)
parent9af4f0026d1bfff9ff5688b67a8730103f5ece2f (diff)
downloadframeworks_av-032ecb7f233f392e6e68f030bf72a9bc7c861d11.zip
frameworks_av-032ecb7f233f392e6e68f030bf72a9bc7c861d11.tar.gz
frameworks_av-032ecb7f233f392e6e68f030bf72a9bc7c861d11.tar.bz2
Merge "Fix in SoftAVCEncoder plugin"
Diffstat (limited to 'media')
-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 795be88..27c63c3 100644
--- a/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
+++ b/media/libstagefright/codecs/avc/enc/SoftAVCEncoder.cpp
@@ -819,9 +819,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;
@@ -985,7 +986,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;