videomixer: use gst_util_uint64_scale*_round.
authorMathieu Duponchelle <mathieu.duponchelle@epitech.eu>
Fri, 19 Jul 2013 20:59:15 +0000 (22:59 +0200)
committerThibault Saunier <thibault.saunier@collabora.com>
Sun, 21 Jul 2013 23:21:57 +0000 (19:21 -0400)
commitd67a671bfb9f0f7e0ae412f9eb784e891f1c3270
tree39dd09ccad4db28b81f9ea2769f8f05ad616d4a1
parent96a8fb92e2bb286f27d36fa875e53ee0a486aa82
videomixer: use gst_util_uint64_scale*_round.

There could be a case where:
      1) you do a new set_caps after buffers have been processed.
      2) ts_offset gets set to a different value, eg 0.033333333
      3) your pads get EOS, but the check dor that doesn't work
         because you use ts_offset + a truncated value < segment.stop
      4) so in the next collected, you end up comparing for example:
      0.9999999999 > 1., which is false and means you don't send EOS.

Also adds scale_round in two other places where it potentially could
have caused problems.
gst/videomixer/videomixer2.c