Fix segfault when using invalid encoding profile
authorDavid Keijser <keijser@gmail.com>
Tue, 10 Nov 2020 22:26:39 +0000 (23:26 +0100)
committerDavid Keijser <keijser@gmail.com>
Tue, 10 Nov 2020 22:26:39 +0000 (23:26 +0100)
commitf3dc83d2852eb9bea9fa4953bb7ffe444e117003
tree4218b36fe61fed91ce490bb0bbf10356a1a53d42
parentb3fe2d3623722ebf9dfe5c3dc198764ce17cba38
Fix segfault when using invalid encoding profile

Trying to use gst_encoding_profile_get_file_extension on a
GstEncodingProfile with a cap containing a typo would result in strcmp
being called with NULL. Instead use g_strcmp0 that handles this case.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/929>
gst-libs/gst/pbutils/encoding-profile.c