bluez: return GST_FLOW_EOS in avdtpsrc create when stream is EOF
authorBernhard Miller <bernhard.miller@streamunlimited.com>
Fri, 2 Aug 2013 13:12:17 +0000 (15:12 +0200)
committerTim-Philipp Müller <tim@centricular.net>
Fri, 2 Aug 2013 13:40:54 +0000 (14:40 +0100)
Signed-off-by: Bernhard Miller <bernhard.miller@streamunlimited.com>
https://bugzilla.gnome.org/show_bug.cgi?id=705349

sys/bluez/gstavdtpsrc.c

index 9d5d5e2..f130151 100644 (file)
@@ -325,9 +325,7 @@ gst_avdtp_src_create (GstBaseSrc * bsrc, guint64 offset, guint length,
   if (ret < 0)
     goto read_error;
   else if (ret == 0) {
-    GST_ERROR_OBJECT (avdtpsrc, "Got EOF on the transport fd");
-    GST_ELEMENT_ERROR ((avdtpsrc), RESOURCE, FAILED, ("Disconnected"
-            " from remote device"), (NULL));
+    GST_INFO_OBJECT (avdtpsrc, "Got EOF on the transport fd");
     goto eof;
   }
 
@@ -350,10 +348,12 @@ alloc_failed:
 read_error:
   GST_ERROR_OBJECT (avdtpsrc, "Error while reading audio data: %s",
       strerror (errno));
-eof:
   gst_buffer_unref (buf);
-
   return GST_FLOW_ERROR;
+
+eof:
+  gst_buffer_unref (buf);
+  return GST_FLOW_EOS;
 }
 
 static gboolean