commit | df9856bcd77fe83a2da2ce232aae6918cfade077 | [log] [tgz] |
---|---|---|
author | Dichen Zhang <dichenzhang@google.com> | Fri Apr 08 10:18:35 2022 -0700 |
committer | Girish <girishshetty@google.com> | Wed Dec 14 18:15:22 2022 +0000 |
tree | 1da14eb69bef1951b4247a552e575030b22c323d | |
parent | 334d96eef6decd8c43813da9c3ebd5d2c1220be6 [diff] |
CCodecConfig: round frame rate instead of truncating to increase the accuracy Bug: b/228607622 Bug: 225821303 Test: encode a video and print log Change-Id: Iba455e8472a3f21c66b90b4ad994287773566b31
diff --git a/media/codec2/sfplugin/CCodecConfig.cpp b/media/codec2/sfplugin/CCodecConfig.cpp index 5208be6..0253815 100644 --- a/media/codec2/sfplugin/CCodecConfig.cpp +++ b/media/codec2/sfplugin/CCodecConfig.cpp
@@ -389,7 +389,7 @@ // read back always as int float value; if (v.get(&value)) { - return (int32_t)value; + return (int32_t) (value + 0.5); } return C2Value(); }));