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

Commit 70d3e260 authored by James Dong's avatar James Dong
Browse files

Check whether WAVE extractor can be initialized successfully in the sniffer for WAVE

bug - 3373994

Change-Id: I91c420815caae3b868fe9184ba48f37046b495fb
parent ff6bf333
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -425,6 +425,11 @@ bool SniffWAV(
        return false;
    }

    sp<MediaExtractor> extractor = new WAVExtractor(source);
    if (extractor->countTracks() == 0) {
        return false;
    }

    *mimeType = MEDIA_MIMETYPE_CONTAINER_WAV;
    *confidence = 0.3f;