multihandlesink: Don't pass NULL caps to gst_caps_is_equal
authorJan Alexander Steffens (heftig) <jan.steffens@ltnglobal.com>
Thu, 1 Oct 2020 09:22:51 +0000 (11:22 +0200)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 8 Oct 2020 21:55:38 +0000 (21:55 +0000)
Apparently the sinkpad caps can get cleared when shutting down the
pipeline while the sink is working, provoking a critical warning.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/842>

gst/tcp/gstmultihandlesink.c

index f1d3d2c..7fbe2ae 100644 (file)
@@ -966,7 +966,7 @@ gst_multi_handle_sink_client_queue_buffer (GstMultiHandleSink * mhsink,
     }
   } else {
     /* there were previous caps recorded, so compare */
-    if (!gst_caps_is_equal (caps, mhclient->caps)) {
+    if (caps && !gst_caps_is_equal (caps, mhclient->caps)) {
       const GValue *sh1, *sh2;
 
       /* caps are not equal, but could still have the same streamheader */