mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
Also clear cached connection filter when relinking pads with the clear-flag set.
Original commit message from CVS: Also clear cached connection filter when relinking pads with the clear-flag set.
This commit is contained in:
parent
8a2381a8ad
commit
84c67b8f69
1 changed files with 12 additions and 3 deletions
15
gst/gstpad.c
15
gst/gstpad.c
|
@ -1467,7 +1467,7 @@ gst_pad_try_set_caps (GstPad *pad, GstCaps *caps)
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
|
gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
|
||||||
GstCaps *filtercaps, gboolean clear)
|
GstCaps *filtercaps, gboolean clear)
|
||||||
{
|
{
|
||||||
GstCaps *srccaps, *sinkcaps;
|
GstCaps *srccaps, *sinkcaps;
|
||||||
GstCaps *intersection = NULL;
|
GstCaps *intersection = NULL;
|
||||||
|
@ -1485,8 +1485,11 @@ gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
|
||||||
"start relink filtered %s:%s and %s:%s, clearing caps",
|
"start relink filtered %s:%s and %s:%s, clearing caps",
|
||||||
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
|
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
|
||||||
|
|
||||||
|
/* FIXME does this leak? */
|
||||||
GST_PAD_CAPS (GST_PAD (realsrc)) = NULL;
|
GST_PAD_CAPS (GST_PAD (realsrc)) = NULL;
|
||||||
GST_PAD_CAPS (GST_PAD (realsink)) = NULL;
|
GST_PAD_CAPS (GST_PAD (realsink)) = NULL;
|
||||||
|
GST_RPAD_FILTER (realsrc) = NULL;
|
||||||
|
GST_RPAD_FILTER (realsink) = NULL;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
GST_INFO (GST_CAT_PADS, "start relink filtered %s:%s and %s:%s",
|
GST_INFO (GST_CAT_PADS, "start relink filtered %s:%s and %s:%s",
|
||||||
|
@ -1522,8 +1525,10 @@ gst_pad_try_relink_filtered_func (GstRealPad *srcpad, GstRealPad *sinkpad,
|
||||||
|
|
||||||
/* then filter this against the app filter */
|
/* then filter this against the app filter */
|
||||||
if (filtercaps) {
|
if (filtercaps) {
|
||||||
GstCaps *filtered_intersection = gst_caps_intersect (intersection,
|
GstCaps *filtered_intersection;
|
||||||
filtercaps);
|
|
||||||
|
filtered_intersection = gst_caps_intersect (intersection,
|
||||||
|
filtercaps);
|
||||||
|
|
||||||
/* get rid of the old intersection here */
|
/* get rid of the old intersection here */
|
||||||
gst_caps_unref (intersection);
|
gst_caps_unref (intersection);
|
||||||
|
@ -1577,6 +1582,9 @@ gst_pad_perform_negotiate (GstPad *srcpad, GstPad *sinkpad)
|
||||||
g_return_val_if_fail (GST_RPAD_PEER (realsrc) != NULL, FALSE);
|
g_return_val_if_fail (GST_RPAD_PEER (realsrc) != NULL, FALSE);
|
||||||
g_return_val_if_fail (GST_RPAD_PEER (realsink) == realsrc, FALSE);
|
g_return_val_if_fail (GST_RPAD_PEER (realsink) == realsrc, FALSE);
|
||||||
|
|
||||||
|
GST_INFO (GST_CAT_PADS, "perform negotiate for link %s:%s-%s:%s",
|
||||||
|
GST_DEBUG_PAD_NAME (realsrc), GST_DEBUG_PAD_NAME (realsink));
|
||||||
|
|
||||||
filter = GST_RPAD_APPFILTER (realsrc);
|
filter = GST_RPAD_APPFILTER (realsrc);
|
||||||
if (filter) {
|
if (filter) {
|
||||||
GST_INFO (GST_CAT_PADS, "dumping filter for link %s:%s-%s:%s",
|
GST_INFO (GST_CAT_PADS, "dumping filter for link %s:%s-%s:%s",
|
||||||
|
@ -1897,6 +1905,7 @@ gst_pad_recalc_allowed_caps (GstPad *pad)
|
||||||
GST_DEBUG (GST_CAT_PROPERTIES, "set allowed caps of %s:%s",
|
GST_DEBUG (GST_CAT_PROPERTIES, "set allowed caps of %s:%s",
|
||||||
GST_DEBUG_PAD_NAME (pad));
|
GST_DEBUG_PAD_NAME (pad));
|
||||||
|
|
||||||
|
|
||||||
peer = GST_RPAD_PEER (pad);
|
peer = GST_RPAD_PEER (pad);
|
||||||
if (peer)
|
if (peer)
|
||||||
return gst_pad_try_relink_filtered (pad, GST_PAD (peer),
|
return gst_pad_try_relink_filtered (pad, GST_PAD (peer),
|
||||||
|
|
Loading…
Reference in a new issue