mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
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:
parent
50e116c4a7
commit
98bd83484c
2 changed files with 4 additions and 4 deletions
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue