sbc/ldac: Don't use GST_CAPS_NONE to mean NULL

The GST_CAPS_NONE macro actually returns a instance of
a empty caps.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1874>
This commit is contained in:
Olivier Crête 2020-12-11 14:52:20 -05:00 committed by GStreamer Marge Bot
parent 50e116c4a7
commit 98bd83484c
2 changed files with 4 additions and 4 deletions

View file

@ -197,11 +197,11 @@ gst_ldac_enc_do_negotiate (GstAudioEncoder * audio_enc)
/* Negotiate output format based on downstream caps restrictions */
caps = gst_pad_get_allowed_caps (GST_AUDIO_ENCODER_SRC_PAD (enc));
if (caps == GST_CAPS_NONE || gst_caps_is_empty (caps))
goto failure;
if (caps == NULL)
caps = gst_static_pad_template_get_caps (&ldac_enc_src_factory);
else if (gst_caps_is_empty (caps))
goto failure;
/* Fixate output caps */
filter_caps = gst_caps_new_simple ("audio/x-ldac", "rate", G_TYPE_INT,

View file

@ -89,11 +89,11 @@ gst_sbc_enc_set_format (GstAudioEncoder * audio_enc, GstAudioInfo * info)
/* negotiate output format based on downstream caps restrictions */
caps = gst_pad_get_allowed_caps (GST_AUDIO_ENCODER_SRC_PAD (enc));
if (caps == GST_CAPS_NONE || gst_caps_is_empty (caps))
goto failure;
if (caps == NULL)
caps = gst_static_pad_template_get_caps (&sbc_enc_src_factory);
else if (gst_caps_is_empty (caps))
goto failure;
/* fixate output caps */
filter_caps = gst_caps_new_simple ("audio/x-sbc", "rate", G_TYPE_INT,