fix possible crash on weird audio streams
[enigma2.git] / lib / service / servicemp3.cpp
index 7c00121d61c265b49d3bfc31c45211351bfcb9e8..1f3e2d03d991d7a55a197ee3f6120763d9ec3739 100644 (file)
@@ -1134,6 +1134,8 @@ void eServiceMP3::gstBusCall(GstBus *bus, GstMessage *msg)
                                GstPad* pad = 0;
                                g_signal_emit_by_name (m_gst_playbin, "get-audio-pad", i, &pad);
                                GstCaps* caps = gst_pad_get_negotiated_caps(pad);
+                               if (!caps)
+                                       continue;
                                GstStructure* str = gst_caps_get_structure(caps, 0);
 gchar *g_type;
 g_type = gst_structure_get_name(str);