alsasrc: return negative value on read error
[platform/upstream/gstreamer.git] / ext / alsa / gstalsasrc.c
index 3b2f4bb..8dc77cd 100644 (file)
@@ -936,7 +936,8 @@ device_disappeared:
     GST_ELEMENT_ERROR (asrc, RESOURCE, READ,
         (_("Error recording from audio device. "
                 "The device has been disconnected.")), (NULL));
-    goto read_error;
+    GST_ALSA_SRC_UNLOCK (asrc);
+    return (guint) - 1;
   }
 }