diff options
author | Vivia Nikolaidou <vivia@ahiru.eu> | 2020-12-08 16:46:42 +0200 |
---|---|---|
committer | GStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org> | 2020-12-09 13:14:40 +0000 |
commit | 82dcb27401f897d9fbe561af17db37f54709bf39 (patch) | |
tree | daf71f69674235fa0ff6fd50dae86e6aaa3ebbe1 /gst | |
parent | 1f7515100caf06fb31d84a40be49dcefd176fce3 (diff) | |
download | gstreamer-plugins-bad-82dcb27401f897d9fbe561af17db37f54709bf39.tar.gz |
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1864>
Diffstat (limited to 'gst')
-rw-r--r-- | gst/mpegtsmux/gstbasetsmux.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/gst/mpegtsmux/gstbasetsmux.c b/gst/mpegtsmux/gstbasetsmux.c index 6e66f4d87..6439832f0 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); |