summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnas Karbila <anaskarbila@aospa.co>2016-12-07 18:05:39 +0100
committerArne Coucheron <arco68@gmail.com>2018-01-27 00:41:43 +0100
commita8297bf8ff246d98f52a564dbbd1d452a863bba8 (patch)
tree20a6adb35ed3d5fa1919df617ab744699d08d064
parentd90b0414e22c7f7489f16163ad9ab445c8955a32 (diff)
downloadandroid_packages_apps_Snap-a8297bf8ff246d98f52a564dbbd1d452a863bba8.zip
android_packages_apps_Snap-a8297bf8ff246d98f52a564dbbd1d452a863bba8.tar.gz
android_packages_apps_Snap-a8297bf8ff246d98f52a564dbbd1d452a863bba8.tar.bz2
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 e3f45d9..dcc1545 100644
--- a/src/com/android/camera/VideoModule.java
+++ b/src/com/android/camera/VideoModule.java
@@ -1795,7 +1795,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();