subparse: fix off by one offset calculation
[platform/upstream/gstreamer.git] / gst / tcp / gsttcpclientsrc.c
index 7cd63d6..d3668b9 100644 (file)
@@ -16,8 +16,8 @@
  *
  * You should have received a copy of the GNU Library General Public
  * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
  */
 
 /**
@@ -112,7 +112,7 @@ gst_tcp_client_src_class_init (GstTCPClientSrcClass * klass)
   gst_element_class_add_pad_template (gstelement_class,
       gst_static_pad_template_get (&srctemplate));
 
-  gst_element_class_set_details_simple (gstelement_class,
+  gst_element_class_set_static_metadata (gstelement_class,
       "TCP client source", "Source/Network",
       "Receive data as a client over the network via TCP",
       "Thomas Vander Stichele <thomas at apestaart dot org>");
@@ -245,7 +245,7 @@ gst_tcp_client_src_create (GstPushSrc * psrc, GstBuffer ** outbuf)
     *outbuf = NULL;
   } else if (rret < 0) {
     if (g_error_matches (err, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
-      ret = GST_FLOW_WRONG_STATE;
+      ret = GST_FLOW_FLUSHING;
       GST_DEBUG_OBJECT (src, "Cancelled reading from socket");
     } else {
       ret = GST_FLOW_ERROR;
@@ -290,7 +290,7 @@ get_available_error:
 wrong_state:
   {
     GST_DEBUG_OBJECT (src, "connection to closed, cannot read data");
-    return GST_FLOW_WRONG_STATE;
+    return GST_FLOW_FLUSHING;
   }
 }