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

Commit e94691c4 authored by Dhananjay Kumar's avatar Dhananjay Kumar Committed by Steve Kondik
Browse files

libstagefright - Fix seek on audio having empty stss block

Ignore stss block for audio even if its present, all audio
sample are sync samples itself, self decodeable and playable.

Parsing this block for audio restricts audio seek to few entries
available in this block, sometimes 0, which is undesired.

CRs-Fixed: 664870
Change-Id: If3208d5c0557d3eaeddf875d6c6762bd870c439b
parent 06b33a4a
Loading
Loading
Loading
Loading
+14 −6
Original line number Diff line number Diff line
@@ -1536,6 +1536,14 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {

        case FOURCC('s', 't', 's', 's'):
        {
            // Ignore stss block for audio even if its present
            // All audio sample are sync samples itself,
            // self decodeable and playable.
            // Parsing this block for audio restricts audio seek to few entries
            // available in this block, sometimes 0, which is undesired.
            const char *mime;
            CHECK(mLastTrack->meta->findCString(kKeyMIMEType, &mime));
            if (strncasecmp("audio/", mime, 6)) {
                status_t err =
                    mLastTrack->sampleTable->setSyncSampleParams(
                            data_offset, chunk_data_size);
@@ -1543,7 +1551,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                if (err != OK) {
                    return err;
                }

            }
            *offset += chunk_size;
            break;
        }