From 52368091e3fc5a63fa21d12057fdcdcbf9793f35 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 17 Dec 2018 10:16:06 +0100 Subject: [PATCH] v4l2: actually pass the device path to the node --- spa/plugins/v4l2/v4l2-device.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spa/plugins/v4l2/v4l2-device.c b/spa/plugins/v4l2/v4l2-device.c index 21c1c5a8d..8b130627f 100644 --- a/spa/plugins/v4l2/v4l2-device.c +++ b/spa/plugins/v4l2/v4l2-device.c @@ -73,6 +73,7 @@ static int emit_info(struct impl *this) { int res; struct spa_dict_item items[6]; + struct spa_dict dict; if ((res = spa_v4l2_open(&this->dev, this->props.device)) < 0) return res; @@ -83,16 +84,16 @@ static int emit_info(struct impl *this) items[3] = SPA_DICT_ITEM_INIT("v4l2.driver", (char *)this->dev.cap.driver); items[4] = SPA_DICT_ITEM_INIT("v4l2.card", (char *)this->dev.cap.card); items[5] = SPA_DICT_ITEM_INIT("v4l2.bus", (char *)this->dev.cap.bus_info); + dict = SPA_DICT_INIT(items, 6); if (this->callbacks->info) - this->callbacks->info(this->callbacks_data, &SPA_DICT_INIT(items, 6)); + this->callbacks->info(this->callbacks_data, &dict); if (this->callbacks->add) { if (spa_v4l2_is_capture(&this->dev)) { this->callbacks->add(this->callbacks_data, 0, &spa_v4l2_source_factory, - SPA_TYPE_INTERFACE_Node, - &SPA_DICT_INIT(items, 1)); + SPA_TYPE_INTERFACE_Node, &dict); } }