validate:scenario: Fix 'on-message' actions execution

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-devtools/-/merge_requests/177>
This commit is contained in:
Thibault Saunier 2020-04-21 15:48:20 -04:00
parent 4f7217b0b3
commit 58de8e5330

View file

@ -2,7 +2,7 @@
*
* Copyright (C) 2013 Collabora Ltd.
* Author: Thibault Saunier <thibault.saunier@collabora.com>
* Copyright (C) 2018-2019 Igalia S.L
* Copyright (C) 2018-2020 Igalia S.L
*
* gst-validate-scenario.c - Validate Scenario class
@ -2135,7 +2135,9 @@ execute_next_action_full (GstValidateScenario * scenario, GstMessage * message)
if (message) {
if (!_check_message_type (scenario, act, message))
return G_SOURCE_CONTINUE;
} else if (!_check_position (scenario, act, &position, &rate)) {
} else if ((act && gst_structure_get_string (act->structure, "on-message") &&
!GST_CLOCK_TIME_IS_VALID (act->playback_time)) ||
(!_check_position (scenario, act, &position, &rate))) {
return G_SOURCE_CONTINUE;
}