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

Commit 6da6ace7 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

nuplayer: Don't assume audio streams have metadata

* Not all do, especially if the device doesn't offload PCM :)
* Companion change to Ibf7c3a2fa4f54b56c39cc69b1ff6b474738ee339

Change-Id: I2a567e32c3efd265ee28e3419577c312b6e0559e
parent c1895144
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1176,7 +1176,7 @@ void NuPlayer::openAudioSink(const sp<AMessage> &format, bool offloadOnly) {

    AString mime;
    CHECK(format->findString("mime", &mime));
    if (!strcasecmp(mime.c_str(), MEDIA_MIMETYPE_AUDIO_RAW)) {
    if (audioMeta != NULL && !strcasecmp(mime.c_str(), MEDIA_MIMETYPE_AUDIO_RAW)) {
        int32_t srcBitsPerSample, bitsPerSample = 16;
        int32_t srcChannels, channels = 0;
        int32_t srcSampleRate, sampleRate = 0;