summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAnas Karbila <anaskarbila@aospa.co>2016-12-07 18:05:39 +0100
committerChippa-a <vusal1372@gmail.com>2019-10-25 15:55:25 +0300
commitc4fd1cd00b2d751e6891fd0fb69ab858f4752684 (patch)
tree2c444a769553d73e753208144691db903833e059 /src/com
parentea36d70354e280e0d3ac90fdf8fe25b2031dd25c (diff)
downloadandroid_packages_apps_Snap-c4fd1cd00b2d751e6891fd0fb69ab858f4752684.tar.gz
android_packages_apps_Snap-c4fd1cd00b2d751e6891fd0fb69ab858f4752684.tar.bz2
android_packages_apps_Snap-c4fd1cd00b2d751e6891fd0fb69ab858f4752684.zip
VideoModule: don't set negative HFR value
Change-Id: Ic5e429c16792af7f3af0155f50c162487ffa4ef7 (cherry picked from commit 460c0f207ad453473a1d2d5f0f94651578f5eccb) Signed-off-by: Alex Naidis <alex.naidis@linux.com>
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/camera/VideoModule.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/camera/VideoModule.java b/src/com/android/camera/VideoModule.java
index 1968ca870..c49fa7c4d 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1793,7 +1793,11 @@ public class VideoModule implements CameraModule,
// In case framerate is different, scale the bitrate
int scaledBitrate = getHighSpeedVideoEncoderBitRate(mProfile, targetFrameRate);
Log.i(TAG, "Scaled Video bitrate : " + scaledBitrate);
- mMediaRecorder.setVideoEncodingBitRate(scaledBitrate);
+ if (scaledBitrate > 0) {
+ mMediaRecorder.setVideoEncodingBitRate(scaledBitrate);
+ } else {
+ Log.e(TAG, "Cannot set Video bitrate because its negative");
+ }
}
setRecordLocation();