mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
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:
parent
0484d658a8
commit
e7b962d9b5
1 changed files with 5 additions and 16 deletions
|
@ -455,26 +455,17 @@ gst_alpha_combine_alpha_event (GstPad * pad, GstObject * object,
|
||||||
case GST_EVENT_CAPS:
|
case GST_EVENT_CAPS:
|
||||||
{
|
{
|
||||||
GstCaps *caps;
|
GstCaps *caps;
|
||||||
gboolean ret;
|
|
||||||
|
|
||||||
gst_event_parse_caps (event, &caps);
|
gst_event_parse_caps (event, &caps);
|
||||||
ret = gst_alpha_combine_set_alpha_format (self, caps);
|
gst_alpha_combine_set_alpha_format (self, caps);
|
||||||
gst_event_unref (event);
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
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:
|
default:
|
||||||
break;
|
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
|
static gboolean
|
||||||
|
@ -589,11 +580,9 @@ gst_alpha_combine_init (GstAlphaCombine * self)
|
||||||
g_cond_init (&self->buffer_cond);
|
g_cond_init (&self->buffer_cond);
|
||||||
|
|
||||||
GST_PAD_SET_PROXY_SCHEDULING (self->sink_pad);
|
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_SCHEDULING (self->src_pad);
|
||||||
|
|
||||||
GST_PAD_SET_PROXY_ALLOCATION (self->sink_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->sink_pad, gst_alpha_combine_sink_chain);
|
||||||
gst_pad_set_chain_function (self->alpha_pad, gst_alpha_combine_alpha_chain);
|
gst_pad_set_chain_function (self->alpha_pad, gst_alpha_combine_alpha_chain);
|
||||||
|
|
Loading…
Reference in a new issue