mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 02:30:35 +00:00
cccombiner: Correct sink_query chain up and fix caps leaks
Don't chain up to src_query() from sink_query() method, and returned caps by gst_static_pad_template_get_caps() needs to be cleared. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1513>
This commit is contained in:
parent
5ffd2c64a0
commit
91f9490529
1 changed files with 6 additions and 2 deletions
|
@ -521,6 +521,7 @@ gst_cc_combiner_src_query (GstAggregator * aggregator, GstQuery * query)
|
|||
gst_query_parse_accept_caps (query, &caps);
|
||||
gst_query_set_accept_caps_result (query, gst_caps_is_subset (caps,
|
||||
templ));
|
||||
gst_caps_unref (templ);
|
||||
ret = TRUE;
|
||||
break;
|
||||
}
|
||||
|
@ -553,7 +554,8 @@ gst_cc_combiner_sink_query (GstAggregator * aggregator,
|
|||
ret = gst_pad_peer_query (srcpad, query);
|
||||
} else {
|
||||
ret =
|
||||
GST_AGGREGATOR_CLASS (parent_class)->src_query (aggregator, query);
|
||||
GST_AGGREGATOR_CLASS (parent_class)->sink_query (aggregator,
|
||||
aggpad, query);
|
||||
}
|
||||
break;
|
||||
case GST_QUERY_CAPS:
|
||||
|
@ -587,11 +589,13 @@ gst_cc_combiner_sink_query (GstAggregator * aggregator,
|
|||
gst_query_parse_accept_caps (query, &caps);
|
||||
gst_query_set_accept_caps_result (query, gst_caps_is_subset (caps,
|
||||
templ));
|
||||
gst_caps_unref (templ);
|
||||
ret = TRUE;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ret = GST_AGGREGATOR_CLASS (parent_class)->src_query (aggregator, query);
|
||||
ret = GST_AGGREGATOR_CLASS (parent_class)->sink_query (aggregator,
|
||||
aggpad, query);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue