diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkav1enc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkav1enc.c index acc6d2ff96..2343360caa 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkav1enc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkav1enc.c @@ -126,7 +126,7 @@ gst_msdkav1enc_set_format (GstMsdkEnc * encoder) profile = gst_structure_get_string (s, "profile"); if (profile) { - if (!strcmp (profile, "main")) + if (!g_strcmp0 (profile, "main")) thiz->profile = MFX_PROFILE_AV1_MAIN; else g_assert_not_reached (); diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c index ecc8df9be3..a2fababa35 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkcontext.c @@ -92,8 +92,8 @@ get_device_path (void) if (fd >= 0) { drmVersionPtr drm_version = drmGetVersion (fd); - if (!drm_version || (strncmp (drm_version->name, "i915", 4) && - strncmp (drm_version->name, "xe", 2))) { + if (!drm_version || (strncmp (drm_version->name, "i915", 4) + && strncmp (drm_version->name, "xe", 2))) { GST_ERROR ("The specified device isn't an Intel device"); drmFreeVersion (drm_version); close (fd); @@ -131,9 +131,9 @@ get_device_path (void) dev = (GUdevDevice *) l->data; parent = g_udev_device_get_parent (dev); - if (strcmp (g_udev_device_get_subsystem (parent), "pci") != 0 || - (strcmp (g_udev_device_get_driver (parent), "i915") != 0 && - strcmp (g_udev_device_get_driver (parent), "xe") != 0)) { + if (g_strcmp0 (g_udev_device_get_subsystem (parent), "pci") != 0 + || (g_strcmp0 (g_udev_device_get_driver (parent), "i915") != 0 + && g_strcmp0 (g_udev_device_get_driver (parent), "xe") != 0)) { g_object_unref (parent); continue; } diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh264enc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh264enc.c index 1d85c1385e..ed8b9ea697 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh264enc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh264enc.c @@ -305,13 +305,13 @@ gst_msdkh264enc_set_format (GstMsdkEnc * encoder) profile = gst_structure_get_string (s, "profile"); if (profile) { - if (!strcmp (profile, "high")) { + if (!g_strcmp0 (profile, "high")) { thiz->profile = MFX_PROFILE_AVC_HIGH; - } else if (!strcmp (profile, "main")) { + } else if (!g_strcmp0 (profile, "main")) { thiz->profile = MFX_PROFILE_AVC_MAIN; - } else if (!strcmp (profile, "baseline")) { + } else if (!g_strcmp0 (profile, "baseline")) { thiz->profile = MFX_PROFILE_AVC_BASELINE; - } else if (!strcmp (profile, "constrained-baseline")) { + } else if (!g_strcmp0 (profile, "constrained-baseline")) { thiz->profile = MFX_PROFILE_AVC_CONSTRAINED_BASELINE; } else { thiz->profile = MFX_PROFILE_UNKNOWN; diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh265enc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh265enc.c index 6584c8f61b..b182643033 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh265enc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkh265enc.c @@ -371,11 +371,11 @@ gst_msdkh265enc_configure (GstMsdkEnc * encoder) if (h265enc->profile_name) { encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_MAIN; - if (!strcmp (h265enc->profile_name, "main-10")) + if (!g_strcmp0 (h265enc->profile_name, "main-10")) encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_MAIN10; - else if (!strcmp (h265enc->profile_name, "main-still-picture")) + else if (!g_strcmp0 (h265enc->profile_name, "main-still-picture")) encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_MAINSP; - else if (!strcmp (h265enc->profile_name, "main-10-still-picture")) { + else if (!g_strcmp0 (h265enc->profile_name, "main-10-still-picture")) { encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_MAIN10; h265enc->ext_param.Header.BufferId = MFX_EXTBUFF_HEVC_PARAM; h265enc->ext_param.Header.BufferSz = sizeof (h265enc->ext_param); @@ -383,18 +383,18 @@ gst_msdkh265enc_configure (GstMsdkEnc * encoder) MFX_HEVC_CONSTR_REXT_ONE_PICTURE_ONLY; gst_msdkenc_add_extra_param (encoder, (mfxExtBuffer *) & h265enc->ext_param); - } else if (!strcmp (h265enc->profile_name, "main-444") || - !strcmp (h265enc->profile_name, "main-422-10") || - !strcmp (h265enc->profile_name, "main-444-10") || - !strcmp (h265enc->profile_name, "main-12") || - !strcmp (h265enc->profile_name, "main-422-12")) + } else if (!g_strcmp0 (h265enc->profile_name, "main-444") || + !g_strcmp0 (h265enc->profile_name, "main-422-10") || + !g_strcmp0 (h265enc->profile_name, "main-444-10") || + !g_strcmp0 (h265enc->profile_name, "main-12") || + !g_strcmp0 (h265enc->profile_name, "main-422-12")) encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_REXT; #if (MFX_VERSION >= 1032) - else if (!strcmp (h265enc->profile_name, "screen-extended-main") || - !strcmp (h265enc->profile_name, "screen-extended-main-10") || - !strcmp (h265enc->profile_name, "screen-extended-main-444") || - !strcmp (h265enc->profile_name, "screen-extended-main-444-10")) + else if (!g_strcmp0 (h265enc->profile_name, "screen-extended-main") || + !g_strcmp0 (h265enc->profile_name, "screen-extended-main-10") || + !g_strcmp0 (h265enc->profile_name, "screen-extended-main-444") || + !g_strcmp0 (h265enc->profile_name, "screen-extended-main-444-10")) encoder->param.mfx.CodecProfile = MFX_PROFILE_HEVC_SCC; #endif } else { diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkmpeg2enc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkmpeg2enc.c index 191699cc37..499567ff70 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkmpeg2enc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkmpeg2enc.c @@ -109,11 +109,11 @@ gst_msdkmpeg2enc_set_format (GstMsdkEnc * encoder) profile = gst_structure_get_string (s, "profile"); if (profile) { - if (!strcmp (profile, "high")) { + if (!g_strcmp0 (profile, "high")) { thiz->profile = MFX_PROFILE_MPEG2_HIGH; - } else if (!strcmp (profile, "main")) { + } else if (!g_strcmp0 (profile, "main")) { thiz->profile = MFX_PROFILE_MPEG2_MAIN; - } else if (!strcmp (profile, "simple")) { + } else if (!g_strcmp0 (profile, "simple")) { thiz->profile = MFX_PROFILE_MPEG2_SIMPLE; } else { g_assert_not_reached (); diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvc1dec.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvc1dec.c index 78de761496..e42a94b282 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvc1dec.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvc1dec.c @@ -97,9 +97,9 @@ gst_msdkvc1dec_configure (GstMsdkDec * decoder) profile_str = gst_structure_get_string (structure, "profile"); - if (!strcmp (profile_str, "simple")) + if (!g_strcmp0 (profile_str, "simple")) decoder->param.mfx.CodecProfile = MFX_PROFILE_VC1_SIMPLE; - else if (!strcmp (profile_str, "main")) + else if (!g_strcmp0 (profile_str, "main")) decoder->param.mfx.CodecProfile = MFX_PROFILE_VC1_MAIN; else { decoder->param.mfx.CodecProfile = MFX_PROFILE_VC1_ADVANCED; diff --git a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvp9enc.c b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvp9enc.c index fb9d0c4f47..ac3cbe4178 100644 --- a/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvp9enc.c +++ b/subprojects/gst-plugins-bad/sys/msdk/gstmsdkvp9enc.c @@ -113,13 +113,13 @@ gst_msdkvp9enc_set_format (GstMsdkEnc * encoder) profile = gst_structure_get_string (s, "profile"); if (profile) { - if (!strcmp (profile, "3")) { + if (!g_strcmp0 (profile, "3")) { thiz->profile = MFX_PROFILE_VP9_3; - } else if (!strcmp (profile, "2")) { + } else if (!g_strcmp0 (profile, "2")) { thiz->profile = MFX_PROFILE_VP9_2; - } else if (!strcmp (profile, "1")) { + } else if (!g_strcmp0 (profile, "1")) { thiz->profile = MFX_PROFILE_VP9_1; - } else if (!strcmp (profile, "0")) { + } else if (!g_strcmp0 (profile, "0")) { thiz->profile = MFX_PROFILE_VP9_0; } else { g_assert_not_reached ();