openmpt: update from now deprecated api
authorJordan Petridis <jordan@centricular.com>
Wed, 6 Jul 2022 13:14:13 +0000 (16:14 +0300)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 21 Jul 2022 07:52:37 +0000 (07:52 +0000)
https://lib.openmpt.org/doc/classopenmpt_1_1module.html#ab2695af0baa274054f5687741fa7c05b

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2721>

subprojects/gst-plugins-bad/ext/openmpt/gstopenmptdec.c

index 70e2dae..35c7058 100644 (file)
@@ -562,8 +562,14 @@ gst_openmpt_dec_load_from_buffer (GstNonstreamAudioDecoder * dec,
    * need to query it here, *before* any openmpt_module_select_subsong()
    * calls are done */
   {
+
+#if OPENMPT_API_VERSION_AT_LEAST(0,5,0)
+    gchar const *subsong_cstr =
+        openmpt_module_ctl_get_text (openmpt_dec->mod, "subsong");
+#else
     gchar const *subsong_cstr =
         openmpt_module_ctl_get (openmpt_dec->mod, "subsong");
+#endif
     gchar *endptr;
 
     if (subsong_cstr != NULL) {