summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnas Karbila <anaskarbila@aospa.co>2016-12-07 18:05:39 +0100
committerBruno Martins <bgcngm@gmail.com>2018-11-20 12:32:17 +0000
commit84608da292b6b275b44a8fa9021d487f0b7e25de (patch)
tree90c849045ec34e6e1840c9f05cc4761922bad6a4
parent75fdbc3d5059e6ac5282020ac4f4a7df50865ae0 (diff)
downloadandroid_packages_apps_Snap-84608da292b6b275b44a8fa9021d487f0b7e25de.tar.gz
android_packages_apps_Snap-84608da292b6b275b44a8fa9021d487f0b7e25de.tar.bz2
android_packages_apps_Snap-84608da292b6b275b44a8fa9021d487f0b7e25de.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>
-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();