v4l2codecs: Switch gst_codec_picture_ts_ns() to gst_util_uint64_scale_int()

Instead of plain multiplication, use gst_util_uint64_scale_int()
to achieve the same effect with additional checks.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5791>
This commit is contained in:
Marek Vasut 2023-12-10 14:28:42 +01:00 committed by GStreamer Marge Bot
parent 3335af0efe
commit 5f3d4215a0

View file

@ -35,7 +35,7 @@
* Since: 1.24
*/
#define GST_CODEC_PICTURE_TS_NS(picture) \
(GST_CODEC_PICTURE_FRAME_NUMBER(picture) * G_GUINT64_CONSTANT (1000))
gst_util_uint64_scale_int (GST_CODEC_PICTURE_FRAME_NUMBER(picture), 1000, 1)
G_BEGIN_DECLS