video-info: Don't crash in gst_video_info_is_equal() if one videoinfo is zero-initialized

Instead handle it like gst_audio_info_is_equal() and consider both different.
And also add a shortcut for the pointers to both infos being equal.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/7055>
This commit is contained in:
Sebastian Dröge 2024-06-18 16:27:39 +03:00 committed by GStreamer Marge Bot
parent a4a21feb87
commit 9da1268656

View file

@ -605,6 +605,10 @@ gst_video_info_is_equal (const GstVideoInfo * info, const GstVideoInfo * other)
{
gint i;
if (info == other)
return TRUE;
if (info->finfo == NULL || other->finfo == NULL)
return FALSE;
if (GST_VIDEO_INFO_FORMAT (info) != GST_VIDEO_INFO_FORMAT (other))
return FALSE;
if (GST_VIDEO_INFO_INTERLACE_MODE (info) !=