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

Commit cd249c40 authored by Wei Jia's avatar Wei Jia
Browse files

Check meta before dereferencing it.

Change-Id: Ic8153b33413a34d75a3053dbfb9530a639e0ec12
parent 01cab9ce
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -613,6 +613,9 @@ bool canOffloadStream(const sp<MetaData>& meta, bool hasVideo,
                      bool isStreaming, audio_stream_type_t streamType)
{
    const char *mime;
    if (meta == NULL) {
        return false;
    }
    CHECK(meta->findCString(kKeyMIMEType, &mime));

    audio_offload_info_t info = AUDIO_INFO_INITIALIZER;