diff options
author | David Schleef <ds@schleef.org> | 2004-03-06 01:01:28 +0000 |
---|---|---|
committer | David Schleef <ds@schleef.org> | 2004-03-06 01:01:28 +0000 |
commit | 740ad5455d601df58412d0e01769d6d280359f2c (patch) | |
tree | 57fc238b8a031814478cc0113f4259f914cd8bc5 /gst/udp/gstudpsrc.c | |
parent | 9331801a627de7006d19eb1cf3313dd32f6fb3e0 (diff) |
gst/udp/gstudpsrc.c: Check for unfixed caps and throw an element error. (bug #136334)
Original commit message from CVS:
* gst/udp/gstudpsrc.c: (gst_udpsrc_get): Check for unfixed
caps and throw an element error. (bug #136334)
Diffstat (limited to 'gst/udp/gstudpsrc.c')
-rw-r--r-- | gst/udp/gstudpsrc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gst/udp/gstudpsrc.c b/gst/udp/gstudpsrc.c index 6aced281..66bcd268 100644 --- a/gst/udp/gstudpsrc.c +++ b/gst/udp/gstudpsrc.c @@ -234,9 +234,17 @@ gst_udpsrc_get (GstPad *pad) buf[ret] = '\0'; doc = xmlParseMemory(buf, ret); caps = gst_caps_load_thyself(doc->xmlRootNode); + if (caps == NULL) { + return NULL; + } /* foward the connect, we don't signal back the result here... */ - gst_pad_try_set_caps (udpsrc->srcpad, caps); + if (gst_caps_is_fixed (caps)) { + gst_pad_try_set_caps (udpsrc->srcpad, caps); + } else { + GST_ERROR ("caps %" GST_PTR_FORMAT, caps); + GST_ELEMENT_ERROR (udpsrc, CORE, NEGOTIATION, (NULL), ("Got unfixed caps from peer")); + } #endif g_free (buf); |