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

Commit 2bdbb166 authored by Wei Jia's avatar Wei Jia
Browse files

MPEG4Source: fix fragmented read.

Test: passed CTS test DecoderTest#testDecodeFragmented
Bug: 36571704
Change-Id: I71ad6aaae473b03483f8405899d3178148597bba
(cherry picked from commit ba9af779)
parent f97ade32
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -3914,7 +3914,8 @@ status_t MPEG4Source::parseChunk(off64_t *offset) {


                while (true) {
                while (true) {
                    if (mDataSource->readAt(*offset, hdr, 8) < 8) {
                    if (mDataSource->readAt(*offset, hdr, 8) < 8) {
                        return ERROR_END_OF_STREAM;
                        // no more box to the end of file.
                        break;
                    }
                    }
                    chunk_size = ntohl(hdr[0]);
                    chunk_size = ntohl(hdr[0]);
                    chunk_type = ntohl(hdr[1]);
                    chunk_type = ntohl(hdr[1]);