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>
has_video = gst_encoding_container_profile_has_video (cprofile);
/* Ogg */
- if (strcmp (ext, "ogg") == 0) {
+ if (g_strcmp0 (ext, "ogg") == 0) {
/* ogg with video => .ogv */
if (has_video) {
ext = "ogv";
}
/* Matroska */
- if (has_video && strcmp (ext, "mka") == 0) {
+ if (has_video && g_strcmp0 (ext, "mka") == 0) {
ext = "mkv";
goto done;
}