[aravis] gv_device: check for number of stream channels before creating stream object.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [aravis] gv_device: check for number of stream channels before creating stream object.
- Date: Fri, 6 May 2011 08:43:04 +0000 (UTC)
commit db7926bb4af6aa90b79bb2f7cdaac5c216022846
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Fri May 6 10:42:26 2011 +0200
gv_device: check for number of stream channels before creating stream object.
src/arvgvdevice.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/arvgvdevice.c b/src/arvgvdevice.c
index b5410f4..bc6c843 100644
--- a/src/arvgvdevice.c
+++ b/src/arvgvdevice.c
@@ -569,9 +569,16 @@ arv_gv_device_create_stream (ArvDevice *device, ArvStreamCallback callback, void
const guint8 *address_bytes;
guint32 stream_port;
guint packet_size;
+ guint32 n_stream_channels;
GInetAddress *interface_address;
GInetAddress *device_address;
+ arv_device_read_register (device, ARV_GVBS_N_STREAM_CHANNELS_OFFSET, &n_stream_channels);
+ arv_debug ("device", "[GvDevice::create_stream] Nimber of stream channels = %d", n_stream_channels);
+
+ if (n_stream_channels < 1)
+ return NULL;
+
if (!io_data->is_controller) {
arv_debug ("device", "[GvDevice::create_stream] Can't create stream without control access");
return NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]