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

Commit fdcf28cb authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Remove kKeyNalLengthSize

It was only used internally in MatroskaExtractor, so doesn't need to
be exposed in MetaData.

Test: build

Change-Id: I078f441cd125d161b1cd22557675c7abfb64d7f2
parent 10caf0e2
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -222,7 +222,8 @@ MatroskaSource::MatroskaSource(
                 mExtractor->mTracks.itemAt(index).mTrackNum,
                 index),
      mNALSizeLen(-1) {
    MetaDataBase &meta = mExtractor->mTracks.editItemAt(index).mMeta;
    MatroskaExtractor::TrackInfo &trackInfo = mExtractor->mTracks.editItemAt(index);
    MetaDataBase &meta = trackInfo.mMeta;

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

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

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

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

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

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

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