diff options
author | Yamit Mehta <ymehta@codeaurora.org> | 2015-07-12 18:05:35 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:24:15 -0600 |
commit | 3f854035a48cbaa5059996f039fb0fa2ecd69743 (patch) | |
tree | 07115778f2f9f9004ec17dd4518fcd4c1a676dc7 /media/libstagefright/AudioSource.cpp | |
parent | 3c4559ba9efbcd2c81f149c4c6823796e419cb8a (diff) | |
download | frameworks_av-3f854035a48cbaa5059996f039fb0fa2ecd69743.zip frameworks_av-3f854035a48cbaa5059996f039fb0fa2ecd69743.tar.gz frameworks_av-3f854035a48cbaa5059996f039fb0fa2ecd69743.tar.bz2 |
Initialize the start time if not specified in meta data
If the start time is not specified in meta data, the start time
will be assigned with latency of AudioRecord, it's calculated by
allocated frame count which is not the real start time when the
first frame received
Initialize the start time to the current system time if not
specified in meta data
CRs-Fixed: 812379
Change-Id: Ia007ca4592fe1f96e105d4ec48305c578b677bb1
Diffstat (limited to 'media/libstagefright/AudioSource.cpp')
-rw-r--r-- | media/libstagefright/AudioSource.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index 3505844..01400f6 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -124,6 +124,8 @@ status_t AudioSource::start(MetaData *params) { int64_t startTimeUs; if (params && params->findInt64(kKeyTime, &startTimeUs)) { mStartTimeUs = startTimeUs; + } else { + mStartTimeUs = systemTime() / 1000ll; } status_t err = mRecord->start(); if (err == OK) { |