Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d3bb1ad authored by Alok Kediya's avatar Alok Kediya Committed by Steve Kondik
Browse files

media: Configure audio encode parameters only for valid audio codec.

Added extra check for audio codec in profile
(Cherrypicked from commit eed39d0053dee6649424867418e511b918b3c634)

Change-Id: Ie1ac5252e3d544ce61af2b3ae5080ec9c6966e44
(cherry picked from commit 81dfde16ffb3fc8f6b110a3df2921a3d3361db10)
(cherry picked from commit 8069457a313853247f2017237e29bcf3b3eb2323)
(cherry picked from commit db4bf86a6b50ce84b5a678476ee08c12f0fe272b)
parent d41a61f8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -363,7 +363,7 @@ public class MediaRecorder
             profile.quality <= CamcorderProfile.QUALITY_TIME_LAPSE_QVGA) {
            // 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);