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

Commit 610ae69f authored by Iris Chang's avatar Iris Chang Committed by Marco Nelissen
Browse files

Cannot play mp4 file because of abnormal nal length

Problem: some mp4 file has abnormal nal size and cannot
be played.

Solution: ignore when nal size is abnormal

Bug: 122749422
Test: Play a file which has abnormal nal size and check
if it can ignore abnormal ones and play normally after
abnormal frames

Change-Id: Ic0a53d20ea7e395ab610b8d4895dd3c64ab68106
parent 25783112
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -5659,10 +5659,10 @@ media_status_t MPEG4Source::read(
            }

            if (isMalFormed) {
                ALOGE("Video is malformed");
                mBuffer->release();
                mBuffer = NULL;
                return AMEDIA_ERROR_MALFORMED;
                //if nallength abnormal,ignore it.
                ALOGW("abnormal nallength, ignore this NAL");
                srcOffset = size;
                break;
            }

            if (nalLength == 0) {