Skip to content

Commit

Permalink
alsa: remove useless ret test
Browse files Browse the repository at this point in the history
Use GST_ELEMENT_REGISTER_DEFINE_CUSTOM instead
of GST_ELEMENT_REGISTER_DEFINE_WITH_CODE if a specific
init needs to be tested before registering the element.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/1060>
  • Loading branch information
Stéphane Cerveau committed Mar 10, 2021
1 parent b7c1810 commit 1682161
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ext/alsa/gstalsamidisrc.c
Expand Up @@ -307,7 +307,7 @@ enum
G_DEFINE_TYPE_WITH_CODE (GstAlsaMidiSrc, gst_alsa_midi_src, GST_TYPE_PUSH_SRC,
_do_init);
#define _do_element_init \
ret |= alsa_element_init (plugin);
alsa_element_init (plugin);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsamidisrc, "alsamidisrc",
GST_RANK_PRIMARY, GST_TYPE_ALSA_MIDI_SRC, _do_element_init);

Expand Down
2 changes: 1 addition & 1 deletion ext/alsa/gstalsasink.c
Expand Up @@ -74,7 +74,7 @@ enum
};

#define _do_init \
ret |= alsa_element_init (plugin);
alsa_element_init (plugin);
#define gst_alsasink_parent_class parent_class
G_DEFINE_TYPE (GstAlsaSink, gst_alsasink, GST_TYPE_AUDIO_SINK);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsasink, "alsasink", GST_RANK_PRIMARY,
Expand Down
2 changes: 1 addition & 1 deletion ext/alsa/gstalsasrc.c
Expand Up @@ -72,7 +72,7 @@ enum
#define gst_alsasrc_parent_class parent_class
G_DEFINE_TYPE (GstAlsaSrc, gst_alsasrc, GST_TYPE_AUDIO_SRC);
#define _do_init \
ret |= alsa_element_init (plugin);
alsa_element_init (plugin);
GST_ELEMENT_REGISTER_DEFINE_WITH_CODE (alsasrc, "alsasrc", GST_RANK_PRIMARY,
GST_TYPE_ALSA_SRC, _do_init);

Expand Down

0 comments on commit 1682161

Please sign in to comment.