summaryrefslogtreecommitdiff
path: root/tests/check/elements/videorate.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check/elements/videorate.c')
-rw-r--r--tests/check/elements/videorate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/check/elements/videorate.c b/tests/check/elements/videorate.c
index 132f9c1ad..7db55199a 100644
--- a/tests/check/elements/videorate.c
+++ b/tests/check/elements/videorate.c
@@ -1287,6 +1287,7 @@ listen_sink_query_duration (GstPad * pad, GstPadProbeInfo * info,
if (GST_QUERY_TYPE (query) == GST_QUERY_DURATION) {
gst_query_set_duration (query, GST_FORMAT_TIME, *duration);
+ return GST_PAD_PROBE_HANDLED;
}
return GST_PAD_PROBE_OK;
}
@@ -1304,12 +1305,12 @@ GST_START_TEST (test_query_duration)
"could not set to playing");
probe_sink =
gst_pad_add_probe (mysrcpad,
- GST_PAD_PROBE_TYPE_QUERY_DOWNSTREAM | GST_PAD_PROBE_TYPE_PUSH,
+ GST_PAD_PROBE_TYPE_QUERY_UPSTREAM,
(GstPadProbeCallback) listen_sink_query_duration, &duration, NULL);
query = gst_query_new_duration (GST_FORMAT_TIME);
duration = GST_CLOCK_TIME_NONE;
- gst_pad_peer_query (mysrcpad, query);
+ gst_pad_peer_query (mysinkpad, query);
gst_query_parse_duration (query, NULL, &duration);
fail_unless_equals_uint64 (duration, GST_CLOCK_TIME_NONE);
@@ -1319,7 +1320,7 @@ GST_START_TEST (test_query_duration)
/* Setting rate to 2.0 */
g_object_set (videorate, "rate", 2.0, NULL);
- gst_pad_peer_query (mysrcpad, query);
+ gst_pad_peer_query (mysinkpad, query);
gst_query_parse_duration (query, NULL, &duration);
fail_unless_equals_uint64 (duration, 0.5 * GST_SECOND);