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.
This commit is contained in:
Wim Taymans 2007-06-08 11:00:59 +00:00
parent 45ed0f91b9
commit 4a39d4d4dd
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2007-06-08 Wim Taymans <wim@fluendo.com>
* plugins/elements/gstidentity.c: (gst_identity_transform_ip):
Don't overflow in retimestamping code.
2007-06-07 Sebastien Moutte <sebastien@moutte.net> 2007-06-07 Sebastien Moutte <sebastien@moutte.net>
* libs/gst/controller/gstinterpolation.c: (DEFINE_CUBIC_GET): * libs/gst/controller/gstinterpolation.c: (DEFINE_CUBIC_GET):

View file

@ -544,7 +544,8 @@ gst_identity_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
} }
if (identity->datarate > 0) { 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_TIMESTAMP (buf) = time;
GST_BUFFER_DURATION (buf) = GST_BUFFER_DURATION (buf) =