From: David S. <ds...@pd...> - 2004-03-06 01:08:44
|
CVS Root: /home/cvs/gstreamer Module: gst-plugins Changes by: ds Date: Fri Mar 05 2004 17:01:40 PST Log message: * gst/udp/gstudpsrc.c: (gst_udpsrc_get): Check for unfixed caps and throw an element error. (bug #136334) Modified files: . : ChangeLog gst/udp : gstudpsrc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/ChangeLog.diff?r1=1.375&r2=1.376 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/udp/gstudpsrc.c.diff?r1=1.22&r2=1.23 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /home/cvs/gstreamer/gst-plugins/ChangeLog,v retrieving revision 1.375 retrieving revision 1.376 diff -u -d -r1.375 -r1.376 --- a/ChangeLog 6 Mar 2004 00:42:18 -0000 1.375 +++ b/ChangeLog 6 Mar 2004 01:01:28 -0000 1.376 @@ -1,5 +1,10 @@ 2004-03-05 David Schleef <ds...@sc...> + * gst/udp/gstudpsrc.c: (gst_udpsrc_get): Check for unfixed + caps and throw an element error. (bug #136334) + +2004-03-05 David Schleef <ds...@sc...> * ext/faad/gstfaad.c: (gst_faad_init), (gst_faad_srcgetcaps), (gst_faad_chain): Fix negotiation. * ext/librfb/gstrfbsrc.c: (gst_rfbsrc_handle_src_event): Add Index: gstudpsrc.c RCS file: /home/cvs/gstreamer/gst-plugins/gst/udp/gstudpsrc.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- a/gstudpsrc.c 2 Feb 2004 20:09:09 -0000 1.22 +++ b/gstudpsrc.c 6 Mar 2004 01:01:28 -0000 1.23 @@ -234,9 +234,17 @@ 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); |