From 94d4a3c58565a6a1701ab83112adf62c41e15c37 Mon Sep 17 00:00:00 2001 From: Alok Kediya Date: Thu, 26 Sep 2013 10:35:14 +0530 Subject: 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 --- media/java/android/media/MediaRecorder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.1