From 4560cdff5cfa9d7aef70172d78f7f7939014b3c7 Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Sat, 9 Dec 2023 16:29:03 +0100 Subject: [PATCH] h265decoder: Align wraparound fix Instead of casting GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) to u64, use 1000ULL which is also u64 . This only aligns the behavior here with '*decoder: Fix multiplication wraparound' commits. Part-of: --- .../gst-plugins-bad/sys/v4l2codecs/gstv4l2codech265dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech265dec.c b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech265dec.c index 576f3904b4..c809cb9b9a 100644 --- a/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech265dec.c +++ b/subprojects/gst-plugins-bad/sys/v4l2codecs/gstv4l2codech265dec.c @@ -814,7 +814,7 @@ lookup_dpb_index (struct v4l2_hevc_dpb_entry dpb[16], GstH265Picture * ref_pic) if (!ref_pic) return 0xff; - ref_ts = (guint64) GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) * 1000; + ref_ts = GST_CODEC_PICTURE_FRAME_NUMBER (ref_pic) * G_GUINT64_CONSTANT (1000); for (i = 0; i < 16; i++) { if (dpb[i].timestamp == ref_ts) return i;