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

Commit 1b4c18d7 authored by Marco Nelissen's avatar Marco Nelissen Committed by Android (Google) Code Review
Browse files

Merge "Remove kKeyNalLengthSize"

parents a7ecaf0d fdcf28cb
Loading
Loading
Loading
Loading
+7 −5
Original line number Original line Diff line number Diff line
@@ -221,7 +221,8 @@ MatroskaSource::MatroskaSource(
                 mExtractor->mTracks.itemAt(index).mTrackNum,
                 mExtractor->mTracks.itemAt(index).mTrackNum,
                 index),
                 index),
      mNALSizeLen(-1) {
      mNALSizeLen(-1) {
    MetaDataBase &meta = mExtractor->mTracks.editItemAt(index).mMeta;
    MatroskaExtractor::TrackInfo &trackInfo = mExtractor->mTracks.editItemAt(index);
    MetaDataBase &meta = trackInfo.mMeta;


    const char *mime;
    const char *mime;
    CHECK(meta.findCString(kKeyMIMEType, &mime));
    CHECK(meta.findCString(kKeyMIMEType, &mime));
@@ -234,9 +235,9 @@ MatroskaSource::MatroskaSource(
        uint32_t dummy;
        uint32_t dummy;
        const uint8_t *avcc;
        const uint8_t *avcc;
        size_t avccSize;
        size_t avccSize;
        int32_t nalSizeLen = 0;
        int32_t nalSizeLen = trackInfo.mNalLengthSize;
        if (meta.findInt32(kKeyNalLengthSize, &nalSizeLen)) {
        if (nalSizeLen >= 0) {
            if (nalSizeLen >= 0 && nalSizeLen <= 4) {
            if (nalSizeLen <= 4) {
                mNALSizeLen = nalSizeLen;
                mNALSizeLen = nalSizeLen;
            }
            }
        } else if (meta.findData(kKeyAVCC, &dummy, (const void **)&avcc, &avccSize)
        } else if (meta.findData(kKeyAVCC, &dummy, (const void **)&avcc, &avccSize)
@@ -1226,7 +1227,7 @@ status_t MatroskaExtractor::synthesizeAVCC(TrackInfo *trackInfo, size_t index) {
    }
    }


    // Override the synthesized nal length size, which is arbitrary
    // Override the synthesized nal length size, which is arbitrary
    trackInfo->mMeta.setInt32(kKeyNalLengthSize, 0);
    trackInfo->mNalLengthSize = 0;
    return OK;
    return OK;
}
}


@@ -1343,6 +1344,7 @@ status_t MatroskaExtractor::initTrackInfo(
    trackInfo->mEncrypted = false;
    trackInfo->mEncrypted = false;
    trackInfo->mHeader = NULL;
    trackInfo->mHeader = NULL;
    trackInfo->mHeaderLen = 0;
    trackInfo->mHeaderLen = 0;
    trackInfo->mNalLengthSize = -1;


    for(size_t i = 0; i < track->GetContentEncodingCount(); i++) {
    for(size_t i = 0; i < track->GetContentEncodingCount(); i++) {
        const mkvparser::ContentEncoding *encoding = track->GetContentEncodingByIndex(i);
        const mkvparser::ContentEncoding *encoding = track->GetContentEncodingByIndex(i);
+1 −0
Original line number Original line Diff line number Diff line
@@ -69,6 +69,7 @@ private:
        // in ~MatroskaExtractor.
        // in ~MatroskaExtractor.
        unsigned char *mHeader;
        unsigned char *mHeader;
        size_t mHeaderLen;
        size_t mHeaderLen;
        int32_t mNalLengthSize;


        const mkvparser::Track* getTrack() const;
        const mkvparser::Track* getTrack() const;
        const mkvparser::CuePoint::TrackPosition *find(long long timeNs) const;
        const mkvparser::CuePoint::TrackPosition *find(long long timeNs) const;
+0 −3
Original line number Original line Diff line number Diff line
@@ -198,9 +198,6 @@ enum {
    // MPEG user data offsets
    // MPEG user data offsets
    kKeyMpegUserData      = 'mpud', // size_t[]
    kKeyMpegUserData      = 'mpud', // size_t[]


    // Size of NALU length in mkv/mp4
    kKeyNalLengthSize     = 'nals', // int32_t

    // HDR related
    // HDR related
    kKeyHdrStaticInfo    = 'hdrS', // HDRStaticInfo
    kKeyHdrStaticInfo    = 'hdrS', // HDRStaticInfo