if (!media->reusable && media->reused)
goto is_reused;
+ media->rtpbin = gst_element_factory_make ("gstrtpbin", NULL);
+ if (media->rtpbin == NULL)
+ goto no_gstrtpbin;
+
GST_INFO ("preparing media %p", media);
/* reset some variables */
klass = GST_RTSP_MEDIA_GET_CLASS (media);
media->id = g_source_attach (media->source, klass->context);
- media->rtpbin = gst_element_factory_make ("gstrtpbin", NULL);
-
/* add stuff to the bin */
gst_bin_add (GST_BIN (media->pipeline), media->rtpbin);
GST_WARNING ("can not reuse media %p", media);
return FALSE;
}
+no_gstrtpbin:
+ {
+ GST_WARNING ("no gstrtpbin element");
+ g_warning ("failed to create element 'gstrtpbin', check your installation");
+ return FALSE;
+ }
state_failed:
{
GST_WARNING ("failed to preroll pipeline");