From 4a39d4d4dd6ddb750768da71b28cf7ec140bba1a Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Fri, 8 Jun 2007 11:00:59 +0000 Subject: [PATCH] plugins/elements/gstidentity.c: Don't overflow in retimestamping code. Original commit message from CVS: * plugins/elements/gstidentity.c: (gst_identity_transform_ip): Don't overflow in retimestamping code. --- ChangeLog | 5 +++++ plugins/elements/gstidentity.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d5d04edc58..1d5009959e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-06-08 Wim Taymans + + * plugins/elements/gstidentity.c: (gst_identity_transform_ip): + Don't overflow in retimestamping code. + 2007-06-07 Sebastien Moutte * libs/gst/controller/gstinterpolation.c: (DEFINE_CUBIC_GET): diff --git a/plugins/elements/gstidentity.c b/plugins/elements/gstidentity.c index 216b6230c2..4c633e27d2 100644 --- a/plugins/elements/gstidentity.c +++ b/plugins/elements/gstidentity.c @@ -544,7 +544,8 @@ gst_identity_transform_ip (GstBaseTransform * trans, GstBuffer * buf) } if (identity->datarate > 0) { - GstClockTime time = identity->offset * GST_SECOND / identity->datarate; + GstClockTime time = gst_util_uint64_scale_int (identity->offset, + GST_SECOND, identity->datarate); GST_BUFFER_TIMESTAMP (buf) = time; GST_BUFFER_DURATION (buf) =