From: Zeeshan A. K. <za...@us...> - 2003-02-10 22:11:09
|
CVS Root: /cvsroot/gstreamer Module: gst-plugins Changes by: zak147 Date: Mon Feb 10 2003 14:11:02 PST Log message: Making some things work and breaking others Modified files: gst/udp : gstudpsink.c Links: http://cvs.sf.net/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins/gst/udp/gstudpsink.c.diff?r1=1.16&r2=1.17 ====Begin Diffs==== Index: gstudpsink.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/gst/udp/gstudpsink.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gstudpsink.c 2 Feb 2003 05:26:28 -0000 1.16 +++ gstudpsink.c 10 Feb 2003 22:10:46 -0000 1.17 @@ -258,7 +258,8 @@ gst_udpsink_chain (GstPad *pad, GstBuffer *buf) { GstUDPSink *udpsink; - guint tolen, i; + guint tolen; + /*guint tolen, i;*/ g_return_if_fail (pad != NULL); g_return_if_fail (GST_IS_PAD (pad)); @@ -276,7 +277,13 @@ tolen = sizeof(udpsink->theiraddr); - for (i = 0; i < GST_BUFFER_SIZE (buf); i += udpsink->mtu) { + if (sendto (udpsink->sock, GST_BUFFER_DATA (buf), + GST_BUFFER_SIZE (buf), 0, (struct sockaddr *) &udpsink->theiraddr, + tolen) == -1) { + perror("sending"); + } + + /*for (i = 0; i < GST_BUFFER_SIZE (buf); i += udpsink->mtu) { if (GST_BUFFER_SIZE (buf) - i > udpsink->mtu) { if (sendto (udpsink->sock, GST_BUFFER_DATA (buf) + i, udpsink->mtu, 0, (struct sockaddr *) &udpsink->theiraddr, @@ -291,7 +298,7 @@ perror("sending"); } } - } + }*/ gst_buffer_unref(buf); } |