GNOME Bugzilla – Bug 775921
multiqueue: Fix overflow on get_buffering_level()
Last modified: 2016-12-13 09:45:54 UTC
multiqueue: Fix overflow on get_buffering_level() Since "time" uses guint64, and "bytes" does guint, scaling it into gint can cause overflow
Created attachment 341712 [details] [review] multiqueue: Fix overflow on get_buffering_level()
When we use buffering of multiqueue, max-size-time over MAX_INT (about 2.14sec) causes overflow. This problem is similar to bug#755971
Review of attachment 341712 [details] [review]: ::: plugins/elements/gstmultiqueue.c @@ +1134,3 @@ if (sq->max_size.time > 0) { tmp = + gst_util_uint64_scale (sq->cur_time, I think this line is the only actually needed change - because it's passing sq->max_size.time as a gint to gst_util_uint64_scale_int(). The result of gst_util_uint64_scale() should fit in an int just fine and gets truncated to that before returning anyway.
Created attachment 341714 [details] [review] multiqueue: Fix overflow on get_buffering_level()
(In reply to Jan Schmidt from comment #3) > Review of attachment 341712 [details] [review] [review]: Thanks for reviewing this. I agree with you :)
Attachment 341714 [details] pushed as ce11dde - multiqueue: Fix overflow on get_buffering_level()