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

Commit f2572aa6 authored by Greg Kaiser's avatar Greg Kaiser
Browse files

MediaCodec: Avoid a string copy

We can take our std::string argument by const reference instead
of copy.

Test: TreeHugger
Change-Id: Ia13bfdeead061816444a498d7bc0c7eba4a68d95
parent 60894b7a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -515,7 +515,7 @@ void RevertOutputFormatIfNeeded(
}

void AmendOutputFormatWithCodecSpecificData(
        const uint8_t *data, size_t size, const std::string mediaType,
        const uint8_t *data, size_t size, const std::string &mediaType,
        const sp<AMessage> &outputFormat) {
    if (mediaType == MIMETYPE_VIDEO_AVC) {
        // Codec specific data should be SPS and PPS in a single buffer,