From c8edf5af010ac24a99b302a18e7b84e8b4b2b783 Mon Sep 17 00:00:00 2001 From: Lajos Molnar Date: Fri, 12 Jun 2015 14:37:49 -0700 Subject: stagefright: use media timestamp for default render timestamp Bug: 21814308 Change-Id: I897bc4878c0b3a758d630e9c117b746ef7e55146 --- media/libstagefright/ACodec.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'media/libstagefright/ACodec.cpp') diff --git a/media/libstagefright/ACodec.cpp b/media/libstagefright/ACodec.cpp index cf37eba..f7d89e4 100644 --- a/media/libstagefright/ACodec.cpp +++ b/media/libstagefright/ACodec.cpp @@ -5202,16 +5202,11 @@ void ACodec::BaseState::onOutputBufferDrained(const sp &msg) { int64_t timestampNs = 0; if (!msg->findInt64("timestampNs", ×tampNs)) { - // TODO: it seems like we should use the timestamp - // in the (media)buffer as it potentially came from - // an input surface, but we did not propagate it prior to - // API 20. Perhaps check for target SDK version. -#if 0 + // use media timestamp if client did not request a specific render timestamp if (info->mData->meta()->findInt64("timeUs", ×tampNs)) { - ALOGV("using buffer PTS of %" PRId64, timestampNs); + ALOGV("using buffer PTS of %lld", (long long)timestampNs); timestampNs *= 1000; } -#endif } status_t err; -- cgit v1.1