From: Vivia Nikolaidou Date: Tue, 8 Dec 2020 14:46:42 +0000 (+0200) Subject: basetsmux: Don't send the capsheader if src pad has no caps X-Git-Tag: 1.19.3~507^2~973 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82dcb27401f897d9fbe561af17db37f54709bf39;p=platform%2Fupstream%2Fgstreamer.git basetsmux: Don't send the capsheader if src pad has no caps That means we're shutting down, so there's no point in the streamheader being sent Part-of: --- diff --git a/gst/mpegtsmux/gstbasetsmux.c b/gst/mpegtsmux/gstbasetsmux.c index 6e66f4d..6439832 100644 --- a/gst/mpegtsmux/gstbasetsmux.c +++ b/gst/mpegtsmux/gstbasetsmux.c @@ -272,9 +272,13 @@ gst_base_ts_mux_set_header_on_caps (GstBaseTsMux * mux) GValue value = { 0 }; GstCaps *caps; - caps = - gst_caps_make_writable (gst_pad_get_current_caps (GST_AGGREGATOR_SRC_PAD - (mux))); + caps = gst_pad_get_current_caps (GST_AGGREGATOR_SRC_PAD (mux)); + + /* If we have no caps, we are possibly shutting down */ + if (!caps) + return; + + caps = gst_caps_make_writable (caps); structure = gst_caps_get_structure (caps, 0); g_value_init (&array, GST_TYPE_ARRAY);