interlace: Fix crash with empty caps in setcaps
authorVivia Nikolaidou <vivia@ahiru.eu>
Thu, 11 Jun 2020 10:50:38 +0000 (13:50 +0300)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 11 Jun 2020 12:06:17 +0000 (12:06 +0000)
commit969e6479252b787e37c62408464f050099565c5c
tree93ef38a1bd4a81fe22aa0d476e80f6a7cdc52a1f
parent7ab51e85ab226ce5107d1d9d4ed408f91d9058fc
interlace: Fix crash with empty caps in setcaps

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>
gst/interlace/gstinterlace.c