diff options
author | James Dong <jdong@google.com> | 2010-09-08 15:07:21 -0700 |
---|---|---|
committer | James Dong <jdong@google.com> | 2010-09-08 17:28:57 -0700 |
commit | 3c3763d2ee1cd1fba7fe522fbaf0faca315d8c2a (patch) | |
tree | 4763aa3d027e3583625cdf3a2eeca8720b7a8f15 /media/libstagefright/AudioSource.cpp | |
parent | f9c0ae8474dc7180a561ed1e7a8ba3d0d31f6d38 (diff) | |
download | frameworks_av-3c3763d2ee1cd1fba7fe522fbaf0faca315d8c2a.zip frameworks_av-3c3763d2ee1cd1fba7fe522fbaf0faca315d8c2a.tar.gz frameworks_av-3c3763d2ee1cd1fba7fe522fbaf0faca315d8c2a.tar.bz2 |
HW audio encoder expects timestamp via kKeyTime from each input buffer
- This fixes media server crashes on droid
Change-Id: I7191cadc5275107425ec3ee3d437b2c5295858dc
Diffstat (limited to 'media/libstagefright/AudioSource.cpp')
-rw-r--r-- | media/libstagefright/AudioSource.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/media/libstagefright/AudioSource.cpp b/media/libstagefright/AudioSource.cpp index c2f79e8..8d7ada3 100644 --- a/media/libstagefright/AudioSource.cpp +++ b/media/libstagefright/AudioSource.cpp @@ -316,8 +316,10 @@ status_t AudioSource::read( } if (numFramesRecorded == 0) { - buffer->meta_data()->setInt64(kKeyTime, mStartTimeUs); + buffer->meta_data()->setInt64(kKeyAnchorTime, mStartTimeUs); } + + buffer->meta_data()->setInt64(kKeyTime, mStartTimeUs + mPrevSampleTimeUs); buffer->meta_data()->setInt64(kKeyDriftTime, readTimeUs - mInitialReadTimeUs); CHECK(timestampUs > mPrevSampleTimeUs); mPrevSampleTimeUs = timestampUs; |