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

Commit a477f831 authored by Bill Yi's avatar Bill Yi Committed by Gerrit Code Review
Browse files

Merge "Merge sc-qpr1 to aosp-master - DO NOT MERGE"

parents 509efdd5 d5d23cdb
Loading
Loading
Loading
Loading
+8 −3
Original line number Original line Diff line number Diff line
@@ -325,11 +325,16 @@ status_t SimpleDecodingSource::doRead(
                    if (!in_buf->meta_data().findInt32(kKeyValidSamples, &numPageSamples)) {
                    if (!in_buf->meta_data().findInt32(kKeyValidSamples, &numPageSamples)) {
                        numPageSamples = -1;
                        numPageSamples = -1;
                    }
                    }
                    if (cpLen + sizeof(numPageSamples) <= in_buffer->capacity()) {
                        memcpy(in_buffer->base() + cpLen, &numPageSamples, sizeof(numPageSamples));
                        memcpy(in_buffer->base() + cpLen, &numPageSamples, sizeof(numPageSamples));
                        cpLen += sizeof(numPageSamples);
                    } else {
                        ALOGW("Didn't have enough space to copy kKeyValidSamples");
                    }
                }
                }


                res = mCodec->queueInputBuffer(
                res = mCodec->queueInputBuffer(
                        in_ix, 0 /* offset */, in_buf->range_length() + (mIsVorbis ? 4 : 0),
                        in_ix, 0 /* offset */, cpLen,
                        timestampUs, 0 /* flags */);
                        timestampUs, 0 /* flags */);
                if (res != OK) {
                if (res != OK) {
                    ALOGI("[%s] failed to queue input buffer #%zu", mComponentName.c_str(), in_ix);
                    ALOGI("[%s] failed to queue input buffer #%zu", mComponentName.c_str(), in_ix);