videorate: Do not loop forever pushing first buffer when variable framerate
authorThibault Saunier <tsaunier@gnome.org>
Tue, 9 Dec 2014 10:31:30 +0000 (11:31 +0100)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Thu, 2 Apr 2015 21:13:24 +0000 (17:13 -0400)
commit1cda538e0077f547bed18b3715e419f22fb06ac3
treef34e5fd4c17b8173eaa9132738f5460a81a79e65
parent0ac3ad0abb714c77a2005a00f23ca2c959320146
videorate: Do not loop forever pushing first buffer when variable framerate

In the case the framerate is variable (represented by framerate=0/1),
we currently end up loop pushing the first buffer and then recompute
diff1 and diff2 without updating the videorate->next_ts at all
leading to infinitely looping pushing that first buffer.

In the case of variable framerate, we should just compute the next_ts
as previous_pts + previous_duration.

https://bugzilla.gnome.org/show_bug.cgi?id=734424
gst/videorate/gstvideorate.c