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

Commit 64c4e026 authored by Chong Zhang's avatar Chong Zhang Committed by Android (Google) Code Review
Browse files

Merge "AnotherPacketSource: return format of first non-discontinuity packet"

parents 434a6094 5bb7e181
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -91,14 +91,12 @@ sp<MetaData> AnotherPacketSource::getFormat() {
    while (it != mBuffers.end()) {
        sp<ABuffer> buffer = *it;
        int32_t discontinuity;
        if (buffer->meta()->findInt32("discontinuity", &discontinuity)) {
            break;
        }

        if (!buffer->meta()->findInt32("discontinuity", &discontinuity)) {
            sp<RefBase> object;
            if (buffer->meta()->findObject("format", &object)) {
                return mFormat = static_cast<MetaData*>(object.get());
            }
        }

        ++it;
    }