commit | fd721debbdf24b2cc3a7e7facde801055a8808c4 | [log] [tgz] |
---|---|---|
author | Dichen Zhang <dichenzhang@google.com> | Fri Apr 08 10:18:35 2022 -0700 |
committer | Dichen Zhang <dichenzhang@google.com> | Fri Apr 08 10:18:35 2022 -0700 |
tree | 355d941e71d9f924dc0e5c1a58a5c7707c6bdcf0 | |
parent | bbe73ba9f47fc4e5a5a660f0f1a5a1180f9aaa05 [diff] [blame] |
CCodecConfig: round frame rate instead of truncating to increase the accuracy Bug: b/228607622 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 dd37c4b..68789db 100644 --- a/media/codec2/sfplugin/CCodecConfig.cpp +++ b/media/codec2/sfplugin/CCodecConfig.cpp
@@ -383,7 +383,7 @@ // read back always as int float value; if (v.get(&value)) { - return (int32_t)value; + return (int32_t) (value + 0.5); } return C2Value(); }));