From 9af85168730c0856c7d4c3e78e3df5796051e04b Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sun, 15 Apr 2018 19:15:28 +0900 Subject: [PATCH] streamcombiner: Forward upstream force-key-unit events to all sinkpads streamcombiner element forwards a upstream event only to one sinkpad. When the streamcombiner is used with encodebin, the sinkpad corresponding to pass-through path is configured before that of encoder, and therefore streamcombiner forwards upstream events only to the firstly configured one (i.e., pass-through path). --- gst/encoding/gststreamcombiner.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/encoding/gststreamcombiner.c b/gst/encoding/gststreamcombiner.c index 7223643b43..22fff918f6 100644 --- a/gst/encoding/gststreamcombiner.c +++ b/gst/encoding/gststreamcombiner.c @@ -22,6 +22,7 @@ #include "config.h" #endif +#include #include "gststreamcombiner.h" #include "gststreamcombinerpad.h" @@ -175,6 +176,10 @@ gst_stream_combiner_src_event (GstPad * pad, GstObject * parent, GstStreamCombiner *stream_combiner = (GstStreamCombiner *) parent; GstPad *sinkpad = NULL; + /* Forward force-key-unit event to all sinkpads */ + if (gst_video_event_is_force_key_unit (event)) + return gst_pad_event_default (pad, parent, event); + STREAMS_LOCK (stream_combiner); if (stream_combiner->current) sinkpad = stream_combiner->current;