From: Philip Chimento Date: Sun, 23 Feb 2014 20:55:13 +0000 (-0800) Subject: gst_caps_to_string() is not always only MIME type X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=10f6655d3991cd16366c7a5e2939b3e463df4dc2;p=projects%2Fchimara%2Fchimara.git gst_caps_to_string() is not always only MIME type In the case of audio/x-mod, other information may follow, so use g_str_has_prefix() instead of strcmp(). --- diff --git a/libchimara/schannel.c b/libchimara/schannel.c index bc59b54..d2f88b8 100644 --- a/libchimara/schannel.c +++ b/libchimara/schannel.c @@ -155,7 +155,8 @@ on_type_found(GstElement *typefind, guint probability, GstCaps *caps, schanid_t WARNING(_("Could not link GStreamer elements")); goto finally; } - } else if(strcmp(type, "audio/x-mod") == 0) { + } else if(g_str_has_prefix(type, "audio/x-mod")) { + /* "audio/x-mod, type=(string)s3m" has been observed */ s->decode = gst_element_factory_make("modplug", NULL); if(!s->decode) { WARNING(_("Could not create 'modplug' GStreamer element"));