If the src_peer_caps are EMPTY (e.g. negotiation failed somewhere), the
assertion inside gst_video_info_from_caps would fail and the whole
pipeline would crash. Check for gst_caps_is_empty before
gst_video_info_from_caps and gracefully fail if it's empty.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1333>
src_peer_caps = gst_pad_peer_query_caps (interlace->srcpad, othercaps);
gst_caps_unref (othercaps);
othercaps = gst_caps_fixate (src_peer_caps);
- if (!gst_video_info_from_caps (&out_info, othercaps))
+ if (gst_caps_is_empty (othercaps)) {
+ gst_caps_unref (othercaps);
goto caps_error;
+ }
+ if (!gst_video_info_from_caps (&out_info, othercaps)) {
+ gst_caps_unref (othercaps);
+ goto caps_error;
+ }
alternate =
GST_VIDEO_INFO_INTERLACE_MODE (&out_info) ==