shout2send: accept audio/webm, audio/ogg and video/ogg as well
authorTim-Philipp Müller <tim@centricular.com>
Fri, 3 Jan 2014 17:30:12 +0000 (17:30 +0000)
committerTim-Philipp Müller <tim@centricular.com>
Tue, 21 Jan 2014 00:49:44 +0000 (00:49 +0000)
Those are advertised in the template caps, but the
setcaps handler didn't handle them. But then oggmux
and oggparse at least for now still always output
application/ogg anyway, so that wasn't a real problem.

ext/shout2/gstshout2.c

index a016d0d..0ce41cd 100644 (file)
@@ -798,10 +798,10 @@ gst_shout2send_setcaps (GstBaseSink * basesink, GstCaps * caps)
 
   if (!strcmp (mimetype, "audio/mpeg")) {
     shout2send->format = SHOUT_FORMAT_MP3;
-  } else if (!strcmp (mimetype, "application/ogg")) {
+  } else if (g_str_has_suffix (mimetype, "/ogg")) {
     shout2send->format = SHOUT_FORMAT_VORBIS;
 #ifdef SHOUT_FORMAT_WEBM
-  } else if (!strcmp (mimetype, "video/webm")) {
+  } else if (g_str_has_suffix (mimetype, "/webm")) {
     shout2send->format = SHOUT_FORMAT_WEBM;
 #endif
   } else {