diff --git a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c index f0fca50404..2971e43613 100644 --- a/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c +++ b/subprojects/gst-plugins-good/gst/rtsp/gstrtspsrc.c @@ -2301,6 +2301,13 @@ gst_rtspsrc_collect_payloads (GstRTSPSrc * src, const GstSDPMessage * sdp, outcaps = gst_caps_intersect (caps, global_caps); gst_caps_unref (caps); + if (gst_caps_is_empty (outcaps)) { + GST_WARNING_OBJECT (src, + " skipping pt %d with caps conflicting with the global caps", pt); + gst_caps_unref (outcaps); + continue; + } + /* the first pt will be the default */ if (stream->ptmap->len == 0) stream->default_pt = pt;