validate:pipeline-monitor: Stop printing position when not possible

Summary:
If from anything >= PAUSED to anything <= READY we can not query
pipeline position, so do not try to.

Depends on D168

Reviewers: Mathieu_Du

Differential Revision: http://phabricator.freedesktop.org/D169
This commit is contained in:
Thibault Saunier 2015-05-13 11:27:25 +02:00
parent 2ccae6e500
commit 0f1f1db171

View file

@ -135,7 +135,7 @@ _bus_handler (GstBus * bus, GstMessage * message,
monitor->print_pos_srcid =
g_timeout_add (PRINT_POSITION_TIMEOUT,
(GSourceFunc) print_position, monitor);
} else if (oldstate == GST_STATE_PAUSED && newstate == GST_STATE_READY) {
} else if (oldstate >= GST_STATE_PAUSED && newstate <= GST_STATE_READY) {
if (monitor->print_pos_srcid
&& g_source_remove (monitor->print_pos_srcid))
monitor->print_pos_srcid = 0;