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

Commit f8b72fc9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "webm: skip CSD for video" into main am: f101f573 am: 523117fc

parents ff1e5ee6 523117fc
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -249,6 +249,11 @@ status_t MediaMuxer::writeSampleData(const sp<ABuffer> &buffer, size_t trackInde
        sampleMetaData.setInt32(kKeyIsMuxerData, 1);
    }

    if (flags & MediaCodec::BUFFER_FLAG_CODECCONFIG) {
        sampleMetaData.setInt32(kKeyIsCodecConfig, true);
        ALOGV("BUFFER_FLAG_CODEC_CONFIG");
    }

    if (flags & MediaCodec::BUFFER_FLAG_EOS) {
        sampleMetaData.setInt32(kKeyIsEndOfStream, 1);
        ALOGV("BUFFER_FLAG_EOS");
+11 −0
Original line number Diff line number Diff line
@@ -354,6 +354,17 @@ void WebmFrameMediaSourceThread::run() {
        }

        MetaDataBase &md = buffer->meta_data();

        if (mType == kVideoType) {
            int32_t isCodecConfig = 0;
            if (md.findInt32(kKeyIsCodecConfig, &isCodecConfig) && isCodecConfig) {
                ALOGI("ignoring CSD for video track");
                buffer->release();
                buffer = NULL;
                continue;
            }
        }

        CHECK(md.findInt64(kKeyTime, &timestampUs));
        if (mStartTimeUs == kUninitialized) {
            mStartTimeUs = timestampUs;