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

Commit 884eafd5 authored by ybai's avatar ybai
Browse files

Add AudioPresentation Support in MPEG4 Extractor

Bug: 285043808
Test: Manually. See details in Bug: 285043808.

Change-Id: I5b2e81c3d356b5277dbffe719b9e287d18fa1fd8
parent 2caed6d5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -6500,6 +6500,16 @@ media_status_t MPEG4Source::read(
            AMediaFormat_setInt32(meta, AMEDIAFORMAT_KEY_IS_SYNC_FRAME, 1);
        }

        void *presentationsData;
        size_t presentationsSize;
        if (AMediaFormat_getBuffer(
                    mFormat, AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_INFO,
                    &presentationsData, &presentationsSize)) {
            AMediaFormat_setBuffer(
                    meta, AMEDIAFORMAT_KEY_AUDIO_PRESENTATION_INFO,
                    presentationsData, presentationsSize);
        }

        ++mCurrentSampleIndex;

        *out = mBuffer;