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

Commit 640e471f authored by microkatz's avatar microkatz Committed by Michael Katz
Browse files

Disable offload for opus in mediaplayer

Trunk Flag Exception Accepted: b/312448703

Bug: 301358116
Test: Tested locally with Opus playback on device that supports offload.
Change-Id: Ibb45bfa58a29edcceffca61bfe1d39bdf86abf5f
parent d5b94b63
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -2483,6 +2483,11 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
                      bool isStreaming, audio_stream_type_t streamType)
{
    audio_offload_info_t info = AUDIO_INFO_INITIALIZER;
    const char *mime;
    if (meta->findCString(kKeyMIMEType, &mime)
        && strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_OPUS) == 0) {
        return false;
    }
    if (OK != getAudioOffloadInfo(meta, hasVideo, isStreaming, streamType, &info)) {
        return false;
    }