diff --git a/codec/h264/h264dec/helpers.go b/codec/h264/h264dec/helpers.go index d9780c29..c15b2416 100644 --- a/codec/h264/h264dec/helpers.go +++ b/codec/h264/h264dec/helpers.go @@ -44,7 +44,10 @@ func binToSlice(s string) ([]byte, error) { } func maxi(a, b int) int { - return int(math.Max(float64(a), float64(b))) + if a > b { + return a + } + return b } func mini(a, b int) int {