summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/CameraSource.cpp9
-rw-r--r--media/libstagefright/MediaCodecSource.cpp9
2 files changed, 8 insertions, 10 deletions
diff --git a/media/libstagefright/CameraSource.cpp b/media/libstagefright/CameraSource.cpp
index 64e7f90..1f26872 100644
--- a/media/libstagefright/CameraSource.cpp
+++ b/media/libstagefright/CameraSource.cpp
@@ -702,11 +702,10 @@ status_t CameraSource::start(MetaData *meta) {
if (meta) {
int64_t startTimeUs;
- auto key = kKeyTimeBoot;
- char value[PROPERTY_VALUE_MAX];
- if (property_get("media.camera.ts.monotonic", value, "0") &&
- atoi(value)) {
- key = kKeyTime;
+ auto key = kKeyTime;
+ if (property_get_bool("persist.camera.HAL3.enabled", true) &&
+ !property_get_bool("media.camera.ts.monotonic", true)) {
+ key = kKeyTimeBoot;
}
if (meta->findInt64(key, &startTimeUs)) {
diff --git a/media/libstagefright/MediaCodecSource.cpp b/media/libstagefright/MediaCodecSource.cpp
index b15ee64..94427ef 100644
--- a/media/libstagefright/MediaCodecSource.cpp
+++ b/media/libstagefright/MediaCodecSource.cpp
@@ -664,11 +664,10 @@ status_t MediaCodecSource::onStart(MetaData *params) {
status_t err = OK;
if (mFlags & FLAG_USE_SURFACE_INPUT) {
- auto key = kKeyTimeBoot;
- char value[PROPERTY_VALUE_MAX];
- if (property_get("media.camera.ts.monotonic", value, "0") &&
- atoi(value)) {
- key = kKeyTime;
+ auto key = kKeyTime;
+ if (property_get_bool("persist.camera.HAL3.enabled", true) &&
+ !property_get_bool("media.camera.ts.monotonic", true)) {
+ key = kKeyTimeBoot;
}
int64_t startTimeUs;