[gstreamer-bugs] [Bug 487488] New: udpsrc errors

GStreamer (bugzilla.gnome.org) bugzilla-daemon at bugzilla.gnome.org
Wed Oct 17 06:02:47 PDT 2007


If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
  http://bugzilla.gnome.org/show_bug.cgi?id=487488

  GStreamer | gst-plugins-good | Ver: HEAD CVS
           Summary: udpsrc errors
           Product: GStreamer
           Version: HEAD CVS
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: spglegle at yahoo.fr
         QAContact: gstreamer-bugs at lists.sourceforge.net
     GNOME version: Unspecified
   GNOME milestone: Unspecified


Context :

- udpsrc is used with a file descriptor (option sokfd)
- This file descriptor is a CONNECTED UDP socket (a connect has been issued on
the fd to peer), so packets are filtered AND ICMP errors may be received by fd.

- When receiving ICMP error, the select() call at gstudpsrc.c:422 returns
indicating something happended on fd, exiting the loop and calling 

  readsize = 0;
  if ((ret = IOCTL_SOCKET (udpsrc->sock, FIONREAD, &readsize)) < 0)
    goto ioctl_failed;

  if (!readsize) 
         goto nothing_to_read;

As the return from select was due to icmp message on network the FIONREAD
returns a redsize of 0, issuing a nothing_to_read => GST_FLOW_ERROR on
pipeline.

I think a readsize of 0 should retry a select on the fd, for ex :
Index: gstudpsrc.c
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/gst/udp/gstudpsrc.c,v
retrieving revision 1.78
diff -u -r1.78 gstudpsrc.c
--- gstudpsrc.c 26 Sep 2007 14:28:20 -0000      1.78
+++ gstudpsrc.c 17 Oct 2007 12:48:06 -0000
@@ -377,6 +377,7 @@

   udpsrc = GST_UDPSRC (psrc);

+retry :
   /* quick check, avoid going in select when we already have data */
   readsize = 0;
   if ((ret = IOCTL_SOCKET (udpsrc->sock, FIONREAD, &readsize)) < 0)
@@ -450,8 +451,8 @@
   if ((ret = IOCTL_SOCKET (udpsrc->sock, FIONREAD, &readsize)) < 0)
     goto ioctl_failed;

-  if (!readsize)
-    goto nothing_to_read;
+  if (!readsize)
+           goto retry;

 no_select:
   GST_LOG_OBJECT (udpsrc, "ioctl says %d bytes available", (int) readsize);
@@ -514,13 +515,6 @@
         ("ioctl failed %d: %s (%d)", ret, g_strerror (errno), errno));
     return GST_FLOW_ERROR;
   }
-nothing_to_read:
-  {
-    GST_ELEMENT_ERROR (udpsrc, RESOURCE, READ, (NULL),
-        ("ioctl returned readsize 0 %d: %s (%d)", ret, g_strerror (errno),
-            errno));
-    return GST_FLOW_ERROR;
-  }
 receive_error:
   {
     g_free (pktdata);


-- 
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.

You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=487488.




More information about the Gstreamer-bugs mailing list