summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlok Kediya <kediya@codeaurora.org>2013-09-26 10:35:14 +0530
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-01-04 16:50:17 -0800
commit94d4a3c58565a6a1701ab83112adf62c41e15c37 (patch)
treeb657ed390d8463835dadaa4a89f0c4402c8ad15e
parent19b0d4165ae0158209152df8af82673dec5ad701 (diff)
downloadframeworks_base-94d4a3c58565a6a1701ab83112adf62c41e15c37.zip
frameworks_base-94d4a3c58565a6a1701ab83112adf62c41e15c37.tar.gz
frameworks_base-94d4a3c58565a6a1701ab83112adf62c41e15c37.tar.bz2
media: Configure audio encode parameters only for valid audio codec.
Added extra check for audio codec in profile (Cherrypicked from commit eed39d0053dee6649424867418e511b918b3c634) Cherry-picked to CM-13.0 to fix crash recording HFR video. Change-Id: Ie1ac5252e3d544ce61af2b3ae5080ec9c6966e44
-rw-r--r--media/java/android/media/MediaRecorder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/media/java/android/media/MediaRecorder.java b/media/java/android/media/MediaRecorder.java
index 4e405e3..7112c1a 100644
--- a/media/java/android/media/MediaRecorder.java
+++ b/media/java/android/media/MediaRecorder.java
@@ -456,7 +456,7 @@ public class MediaRecorder
profile.quality == CamcorderProfile.QUALITY_TIME_LAPSE_VGA) {
// Nothing needs to be done. Call to setCaptureRate() enables
// time lapse video recording.
- } else {
+ } else if (profile.audioCodec >= 0) {
setAudioEncodingBitRate(profile.audioBitRate);
setAudioChannels(profile.audioChannels);
setAudioSamplingRate(profile.audioSampleRate);