diff options
author | Paras Nagda <pnagda@codeaurora.org> | 2015-09-08 17:26:28 +0530 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2015-10-06 03:25:08 -0600 |
commit | 52e6e4cfded3625d54c2b924585e0ef72ba206bd (patch) | |
tree | a2dc85792369024e59df53ce5536f3f444acd116 /media/libmediaplayerservice | |
parent | 69ef79ce3cc954c8a2dbb7fb7f0fcac80a08b73d (diff) | |
download | frameworks_av-52e6e4cfded3625d54c2b924585e0ef72ba206bd.zip frameworks_av-52e6e4cfded3625d54c2b924585e0ef72ba206bd.tar.gz frameworks_av-52e6e4cfded3625d54c2b924585e0ef72ba206bd.tar.bz2 |
MediaRecorder: Handle 24-hour timelapse duration
Use float operations to derive the max-time-between-
frames from capture-rate.
With default (double) precision, calculated value
exceeds 86,400 seconds (1 day) limit if app configures
captureRate = 1 / 24 hours.
Change-Id: Ia171cfa6a45ad315beb55340651abb8066566b26
Diffstat (limited to 'media/libmediaplayerservice')
-rw-r--r-- | media/libmediaplayerservice/StagefrightRecorder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/media/libmediaplayerservice/StagefrightRecorder.cpp b/media/libmediaplayerservice/StagefrightRecorder.cpp index 49804c5..4c2e8fd 100644 --- a/media/libmediaplayerservice/StagefrightRecorder.cpp +++ b/media/libmediaplayerservice/StagefrightRecorder.cpp @@ -588,7 +588,7 @@ status_t StagefrightRecorder::setParamCaptureFpsEnable(int32_t captureFpsEnable) status_t StagefrightRecorder::setParamCaptureFps(float fps) { ALOGV("setParamCaptureFps: %.2f", fps); - int64_t timeUs = (int64_t) (1000000.0 / fps + 0.5f); + int64_t timeUs = (int64_t) (1000000.0f / fps + 0.5f); // Not allowing time more than a day if (timeUs <= 0 || timeUs > 86400*1E6) { |