utils: allow NULL stream_id also when 0 srcpads

We usually first create the stream_id for the stream_start event and then add
the pad to the element. This means that this functions should work when there
are no pads on the element yet.
This commit is contained in:
Wim Taymans 2012-09-11 11:34:11 +02:00
parent a85991eeb8
commit e85dc9cfc8

View file

@ -3577,7 +3577,7 @@ gst_pad_create_stream_id_printf_valist (GstPad * pad, GstElement * parent,
* provide a stream-id for every source pad, otherwise
* all source pads will have the same and are not
* distinguishable */
g_return_val_if_fail (parent->numsrcpads == 1 || stream_id, NULL);
g_return_val_if_fail (parent->numsrcpads <= 1 || stream_id, NULL);
/* First try to get the upstream stream-start stream-id from the sinkpad.
* This will only work for non-source elements */