From 335891c757ba3d65cec172a728102f6e168d006a Mon Sep 17 00:00:00 2001 From: Tim-Philipp Müller Date: Fri, 20 Mar 2009 01:02:26 +0000 Subject: speexenc: fix direction of latency query and other upstream queries Don't send queries back to the element they just came from by sending them to the peer of the wrong pad. --- ext/speex/gstspeexenc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'ext/speex') diff --git a/ext/speex/gstspeexenc.c b/ext/speex/gstspeexenc.c index 631d90b9..bbd463dc 100644 --- a/ext/speex/gstspeexenc.c +++ b/ext/speex/gstspeexenc.c @@ -495,8 +495,9 @@ gst_speex_enc_src_query (GstPad * pad, GstQuery * query) GstClockTime min_latency, max_latency; gint64 latency; - if ((res = gst_pad_peer_query (pad, query))) { + if ((res = gst_pad_peer_query (enc->sinkpad, query))) { gst_query_parse_latency (query, &live, &min_latency, &max_latency); + GST_LOG_OBJECT (pad, "Upstream latency: %" GST_PTR_FORMAT, query); latency = gst_speex_enc_get_latency (enc); @@ -506,11 +507,12 @@ gst_speex_enc_src_query (GstPad * pad, GstQuery * query) max_latency += latency; gst_query_set_latency (query, live, min_latency, max_latency); + GST_LOG_OBJECT (pad, "Adjusted latency: %" GST_PTR_FORMAT, query); } break; } default: - res = gst_pad_peer_query (pad, query); + res = gst_pad_peer_query (enc->sinkpad, query); break; } -- cgit