alphacombine: Ignore all events coming from the alpha_pad

As per usage of this element, everything from this pad is a
duplicate. Instead of implemented needless aggregation, simply
drop all events from this pad and let the one from the main stream
passthrough. Also stop proxying some queries from the alpha pad_too.

This fixes racy test failure:
- validate.file.playback.scrub_forward_seeking.opus_vp9-alpha_webm

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2247>
This commit is contained in:
Nicolas Dufresne 2021-05-14 14:08:17 -04:00
parent 0484d658a8
commit e7b962d9b5

View file

@ -455,26 +455,17 @@ gst_alpha_combine_alpha_event (GstPad * pad, GstObject * object,
case GST_EVENT_CAPS:
{
GstCaps *caps;
gboolean ret;
gst_event_parse_caps (event, &caps);
ret = gst_alpha_combine_set_alpha_format (self, caps);
gst_event_unref (event);
return ret;
gst_alpha_combine_set_alpha_format (self, caps);
}
case GST_EVENT_SEGMENT:
/* Passthrough the segment from the main stream and ignore this one */
gst_event_unref (event);
return TRUE;
case GST_EVENT_EOS:
gst_event_unref (event);
return TRUE;
default:
break;
}
return gst_pad_event_default (pad, object, event);
/* Events are being duplicated, over both branches, so let's just drop this
* secondary stream and use the one from the main stream. */
gst_event_unref (event);
return TRUE;
}
static gboolean
@ -589,11 +580,9 @@ gst_alpha_combine_init (GstAlphaCombine * self)
g_cond_init (&self->buffer_cond);
GST_PAD_SET_PROXY_SCHEDULING (self->sink_pad);
GST_PAD_SET_PROXY_SCHEDULING (self->alpha_pad);
GST_PAD_SET_PROXY_SCHEDULING (self->src_pad);
GST_PAD_SET_PROXY_ALLOCATION (self->sink_pad);
GST_PAD_SET_PROXY_ALLOCATION (self->alpha_pad);
gst_pad_set_chain_function (self->sink_pad, gst_alpha_combine_sink_chain);
gst_pad_set_chain_function (self->alpha_pad, gst_alpha_combine_alpha_chain);