alsasrc: return negative value on read error
authorTim-Philipp Müller <tim@centricular.net>
Mon, 17 Dec 2012 20:32:52 +0000 (20:32 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Mon, 17 Dec 2012 20:50:33 +0000 (20:50 +0000)
Otherwise baseaudiosrc won't go into the error code path.

https://bugzilla.gnome.org/show_bug.cgi?id=690197

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;
   }
 }