diff options
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-03-20 01:02:26 +0000 |
---|---|---|
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | 2009-03-20 01:06:14 +0000 |
commit | 335891c757ba3d65cec172a728102f6e168d006a (patch) | |
tree | 18717f7401ef1d4ae8728b78a9d5e362c0481014 | |
parent | c885b3d0275c3d8626e2f870a6adfb253e7205b0 (diff) |
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.
-rw-r--r-- | ext/speex/gstspeexenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
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; } |