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

Commit c8add23f authored by Mingming Yin's avatar Mingming Yin Committed by Steve Kondik
Browse files

libstagefright: Do not use offload playback for DRM content

- Check DRM handle before checking canOffloadStream.
  Do not use offload playback for DRM contents

Change-Id: I519ab05ffe7812968cccc7beaa16709959cf7a53
CRs-Fixed: 587600
parent 65f4e3a2
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1726,8 +1726,13 @@ status_t AwesomePlayer::initAudioDecoder() {
        streamType = mAudioSink->getAudioStreamType();
    }

    if (mDecryptHandle != NULL) {
        ALOGV("Do not use offload playback for DRM contents");
        mOffloadAudio = false;
    } else {
        mOffloadAudio = canOffloadStream(meta, (mVideoSource != NULL),
                                     isStreamingHTTP(), streamType);
    }

#ifdef QCOM_ENHANCED_AUDIO
    int32_t nchannels = 0;