wtay gst-plugins-good: gst-plugins-good/ gst-plugins-good/gst/rtsp/

[email protected]
Newsgroups gmane.comp.video.gstreamer.cvs
Message-ID <[email protected]>
CVS Root:       /cvs/gstreamer
Module:         gst-plugins-good
Changes by:     wtay
Date:           Thu Nov 27 2008  11:23:10 UTC

Log message:
Patch by: 이문형 <iwings at gmail dot com>
* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_loop_udp):
Prevent further read/write actions taken to the connect-failed socket by
erroring out quickly. See #562258.

Modified files:
    .               : ChangeLog
    gst/rtsp        : gstrtspsrc.c

Links:
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/ChangeLog.diff?r1=1.3837&r2=1.3838
http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-plugins-good/gst/rtsp/gstrtspsrc.c.diff?r1=1.147&r2=1.148

====Begin Diffs====
Index: ChangeLog
===================================================================
RCS file: /cvs/gstreamer/gst-plugins-good/ChangeLog,v
retrieving revision 1.3837
retrieving revision 1.3838
diff -u -d -r1.3837 -r1.3838
--- ChangeLog	26 Nov 2008 21:19:45 -0000	1.3837
+++ ChangeLog	27 Nov 2008 11:22:54 -0000	1.3838
@@ -1,3 +1,11 @@
+2008-11-27  Wim Taymans  <[email protected]>
+
+	Patch by: 이문형 <iwings at gmail dot com>
+	* gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_loop_udp):
+	Prevent further read/write actions taken to the connect-failed socket by
+	erroring out quickly. See #562258.
 2008-11-26  Stefan Kost  <[email protected]>
 
 	* tests/examples/level/level-example.c:
Index: gstrtspsrc.c
RCS file: /cvs/gstreamer/gst-plugins-good/gst/rtsp/gstrtspsrc.c,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- gstrtspsrc.c	24 Nov 2008 12:20:29 -0000	1.147
+++ gstrtspsrc.c	27 Nov 2008 11:22:56 -0000	1.148
@@ -2914,7 +2914,10 @@
           GST_ELEMENT_WARNING (src, RESOURCE, READ, (NULL),
               ("The server closed the connection."));
           gst_rtsp_connection_close (src->connection);
-          gst_rtsp_connection_connect (src->connection, src->ptcp_timeout);
+          res =
+              gst_rtsp_connection_connect (src->connection, src->ptcp_timeout);
+          if (res < 0)
+            goto connect_error;
           continue;
         default:
           goto receive_error;
@@ -3025,11 +3028,20 @@
     g_free (str);
     return GST_FLOW_ERROR;
   }
+connect_error:
+  {
+    gchar *str = gst_rtsp_strresult (res);
+    GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ_WRITE, (NULL),
+        ("Could not connect to server. (%s)", str));
+    g_free (str);
+    return GST_FLOW_ERROR;
+  }
 no_protocols:
   {
     src->cur_protocols = 0;
     /* no transport possible, post an error and stop */
-    GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL),
         ("Could not connect to server, no protocols left"));

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
gstreamer-cvs-verbose mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gstreamer-cvs-verbose
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.