mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-30 12:10:37 +00:00
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.
This commit is contained in:
parent
c885b3d027
commit
335891c757
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue