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

Commit ca67e38e authored by Harish Mahendrakar's avatar Harish Mahendrakar Committed by Ray Essick
Browse files

MPEG4Extractor: Fix opus CSD size

MPEG4Extractor was signally wrong CSD size for csd-0 in case of opus
Instead of signally actual CSD size, size of the array used to hold
the header was being sent.

Bug: 132692852
Test: Manually verified using AMediaExtractor based test application
Change-Id: I88f247a24ab09d0a39b32934659705d7bc9d3f7d
parent 7ec47840
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1772,7 +1772,7 @@ status_t MPEG4Extractor::parseChunk(off64_t *offset, int depth) {
                int64_t codecDelay = pre_skip * 1000000000ll / kOpusSampleRate;

                AMediaFormat_setBuffer(mLastTrack->meta,
                            AMEDIAFORMAT_KEY_CSD_0, opusInfo, sizeof(opusInfo));
                            AMEDIAFORMAT_KEY_CSD_0, opusInfo, opusInfoSize);
                AMediaFormat_setBuffer(mLastTrack->meta,
                        AMEDIAFORMAT_KEY_CSD_1, &codecDelay, sizeof(codecDelay));
                AMediaFormat_setBuffer(mLastTrack->meta,