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

Commit 7d8c3763 authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by Wonsik Kim
Browse files

C2SoftVorbisDec: Ignore subsequent headers

Ignore subsequent headers after decoding the headers once

Bug: 130569201
Test: atest android.media.cts.DecoderTest#testDecodeOgg
Change-Id: Ifa8b67f00d16bfaa5e11097ef3b61ea3f183ced0
parent c9a59dd3
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -270,7 +270,8 @@ void C2SoftVorbisDec::process(
    const uint8_t *data = rView.data() + inOffset;
    int32_t numChannels  = mVi->channels;
    int32_t samplingRate = mVi->rate;
    if (inSize > 7 && !memcmp(&data[1], "vorbis", 6)) {
    /* Decode vorbis headers only once */
    if (inSize > 7 && !memcmp(&data[1], "vorbis", 6) && (!mInfoUnpacked || !mBooksUnpacked)) {
        if ((data[0] != 1) && (data[0] != 5)) {
            ALOGE("unexpected type received %d", data[0]);
            mSignalledError = true;