summaryrefslogtreecommitdiff
path: root/gst/codecalpha
diff options
context:
space:
mode:
authorNicolas Dufresne <nicolas.dufresne@collabora.com>2021-05-14 14:08:17 -0400
committerNicolas Dufresne <nicolas.dufresne@collabora.com>2021-05-14 14:11:39 -0400
commite7b962d9b57f2b1e61314ac80f22ef89e4c9f5f2 (patch)
tree5323b0ee319e00f08f966357ff2e5b5d34aca3a7 /gst/codecalpha
parent0484d658a8d2793ef0b6d11cb597aac16deba3f0 (diff)
downloadgstreamer-plugins-bad-e7b962d9b57f2b1e61314ac80f22ef89e4c9f5f2.tar.gz
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>
Diffstat (limited to 'gst/codecalpha')
-rw-r--r--gst/codecalpha/gstalphacombine.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/gst/codecalpha/gstalphacombine.c b/gst/codecalpha/gstalphacombine.c
index 808a9199c..17414c353 100644
--- a/gst/codecalpha/gstalphacombine.c
+++ b/gst/codecalpha/gstalphacombine.c
@@ -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);