timidity: add support for libtimidity-0.2.x
authorsezero <sezero@users.sourceforge.net>
Sun, 23 Oct 2016 09:02:00 +0000 (12:02 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 31 Oct 2016 10:50:56 +0000 (12:50 +0200)
mid_istream_open_mem() doesn't accept an autofree argument as of
libtimidity >= 0.2.0

https://bugzilla.gnome.org/show_bug.cgi?id=772503

ext/timidity/gsttimidity.c

index 20786940075596a21478ae0dca32bbdb6a74f24f..0b3f3769af524f11f71a7784d43616b77732b139 100644 (file)
@@ -628,8 +628,12 @@ gst_timidity_loop (GstPad * sinkpad)
 
     GST_DEBUG_OBJECT (timidity, "Parsing song");
 
+#if defined(LIBTIMIDITY_VERSION) && LIBTIMIDITY_VERSION < 0x000200L
     stream =
         mid_istream_open_mem (timidity->mididata, timidity->mididata_size, 0);
+#else
+    stream = mid_istream_open_mem (timidity->mididata, timidity->mididata_size);
+#endif
 
     timidity->song = mid_song_load (stream, timidity->song_options);
     mid_istream_close (stream);