mpeg2dec: use 64bit safe scaling functions.

Got this to fail when seeking in a 14GB file (the value in bytes is
bigger than 2**32).
This commit is contained in:
Edward Hervey 2009-05-09 15:28:18 +02:00
parent 674323b56d
commit 58b34b3553

View file

@ -1357,7 +1357,7 @@ gst_mpeg2dec_sink_convert (GstPad * pad, GstFormat src_format, gint64 src_value,
case GST_FORMAT_TIME: case GST_FORMAT_TIME:
if (info->sequence && info->sequence->byte_rate) { if (info->sequence && info->sequence->byte_rate) {
*dest_value = *dest_value =
gst_util_uint64_scale_int (GST_SECOND, src_value, gst_util_uint64_scale (GST_SECOND, src_value,
info->sequence->byte_rate); info->sequence->byte_rate);
GST_WARNING_OBJECT (mpeg2dec, "dest_value:%" GST_TIME_FORMAT, GST_WARNING_OBJECT (mpeg2dec, "dest_value:%" GST_TIME_FORMAT,
GST_TIME_ARGS (*dest_value)); GST_TIME_ARGS (*dest_value));