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

Commit 918ddcc9 authored by Dongwon Kang's avatar Dongwon Kang
Browse files

MatroskaExtractor: handle parse error.

This change makes MatroskaExtractor return EOS when it faces
parse error in the middle of extracting.

Test: manually hardcoded parse error and tested if playback
ends gracefully with Photos app.
Test: pass post submit CTS.
Bug: 73654561

Change-Id: I7f51580114de1304348e4d3305153ce6c3a2f13a
parent b0d44131
Loading
Loading
Loading
Loading
+9 −1
Original line number Original line Diff line number Diff line
@@ -360,7 +360,15 @@ void BlockIterator::advance_l() {


            res = mCluster->Parse(pos, len);
            res = mCluster->Parse(pos, len);
            ALOGV("Parse (2) returned %ld", res);
            ALOGV("Parse (2) returned %ld", res);
            CHECK_GE(res, 0);

            if (res < 0) {
                // I/O error

                ALOGE("Cluster::Parse returned result %ld", res);

                mCluster = NULL;
                break;
            }


            mBlockEntryIndex = 0;
            mBlockEntryIndex = 0;
            continue;
            continue;