mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +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_parse_accept_caps (query, &caps);
|
||||||
gst_query_set_accept_caps_result (query, gst_caps_is_subset (caps,
|
gst_query_set_accept_caps_result (query, gst_caps_is_subset (caps,
|
||||||
templ));
|
templ));
|
||||||
|
gst_caps_unref (templ);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -553,7 +554,8 @@ gst_cc_combiner_sink_query (GstAggregator * aggregator,
|
||||||
ret = gst_pad_peer_query (srcpad, query);
|
ret = gst_pad_peer_query (srcpad, query);
|
||||||
} else {
|
} else {
|
||||||
ret =
|
ret =
|
||||||
GST_AGGREGATOR_CLASS (parent_class)->src_query (aggregator, query);
|
GST_AGGREGATOR_CLASS (parent_class)->sink_query (aggregator,
|
||||||
|
aggpad, query);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case GST_QUERY_CAPS:
|
case GST_QUERY_CAPS:
|
||||||
|
@ -587,11 +589,13 @@ gst_cc_combiner_sink_query (GstAggregator * aggregator,
|
||||||
gst_query_parse_accept_caps (query, &caps);
|
gst_query_parse_accept_caps (query, &caps);
|
||||||
gst_query_set_accept_caps_result (query, gst_caps_is_subset (caps,
|
gst_query_set_accept_caps_result (query, gst_caps_is_subset (caps,
|
||||||
templ));
|
templ));
|
||||||
|
gst_caps_unref (templ);
|
||||||
ret = TRUE;
|
ret = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret = GST_AGGREGATOR_CLASS (parent_class)->src_query (aggregator, query);
|
ret = GST_AGGREGATOR_CLASS (parent_class)->sink_query (aggregator,
|
||||||
|
aggpad, query);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue