diff options
author | James Dong <jdong@google.com> | 2010-06-19 09:04:18 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-06-21 17:34:01 -0700 |
commit | f60cafe0e6aad8f9ce54660fa88b651ae4e749e6 (patch) | |
tree | eabfca8c6c979a1000f49efca5c33ab9039245ba /media/libstagefright/OMXCodec.cpp | |
parent | e6de2667d6bf4bb7b926da6784cc7eb886b93e83 (diff) | |
download | frameworks_av-f60cafe0e6aad8f9ce54660fa88b651ae4e749e6.zip frameworks_av-f60cafe0e6aad8f9ce54660fa88b651ae4e749e6.tar.gz frameworks_av-f60cafe0e6aad8f9ce54660fa88b651ae4e749e6.tar.bz2 |
Audio/video sync during recording (second part)
Change-Id: Iba0b35f57fdeac7ee1da16899406bf4b957a2c8c
Diffstat (limited to 'media/libstagefright/OMXCodec.cpp')
-rw-r--r-- | media/libstagefright/OMXCodec.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/media/libstagefright/OMXCodec.cpp b/media/libstagefright/OMXCodec.cpp index 5a01d79..8979c3b 100644 --- a/media/libstagefright/OMXCodec.cpp +++ b/media/libstagefright/OMXCodec.cpp @@ -2538,7 +2538,7 @@ void OMXCodec::clearCodecSpecificData() { mCodecSpecificDataIndex = 0; } -status_t OMXCodec::start(MetaData *) { +status_t OMXCodec::start(MetaData *meta) { Mutex::Autolock autoLock(mLock); if (mState != LOADED) { @@ -2549,6 +2549,14 @@ status_t OMXCodec::start(MetaData *) { if (mQuirks & kWantsNALFragments) { params->setInt32(kKeyWantsNALFragments, true); } + if (meta) { + int64_t startTimeUs = 0; + int64_t timeUs; + if (meta->findInt64(kKeyTime, &timeUs)) { + startTimeUs = timeUs; + } + params->setInt64(kKeyTime, startTimeUs); + } status_t err = mSource->start(params.get()); if (err != OK) { |