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

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

AMRExtractor: treat partial frame as EOS.

Bug: 23729692
Change-Id: I5e72c994780174173e78c30ebbcf138f7831782d
parent 98c3afea
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -309,7 +309,13 @@ status_t AMRSource::read(
        buffer->release();
        buffer = NULL;

        if (n < 0) {
            return ERROR_IO;
        } else {
            // only partial frame is available, treat it as EOS.
            mOffset += n;
            return ERROR_END_OF_STREAM;
        }
    }

    buffer->set_range(0, frameSize);