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

Commit 758c7385 authored by Ray Essick's avatar Ray Essick
Browse files

pass updated getMetrics() values back to caller

conversion from C++ to C routines lost the fact that a parameter was by
reference and broke back propagation of the updated value. This passes
the update back to caller.

Bug: 140763926
Test: CTS android.media.cts.MediaCodecTest#testDecodeAfterFlush
parent f2bacf0e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -745,6 +745,8 @@ status_t JMediaCodec::getCodecInfo(JNIEnv *env, jobject *codecInfoObject) const
status_t JMediaCodec::getMetrics(JNIEnv *, MediaAnalyticsItem * &reply) const {
    mediametrics_handle_t reply2 = MediaAnalyticsItem::convert(reply);
    status_t status = mCodec->getMetrics(reply2);
    // getMetrics() updates reply2, pass the converted update along to our caller.
    reply = MediaAnalyticsItem::convert(reply2);
    return status;
}