X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=ext%2Fpulse%2Fpulsedevicemonitor.c;h=b4ee8199417cc97ff9c2d3b53cb3469c64fdcd6b;hb=39bbccdf79c74de68cd47c5f8fb1dec9e688cb9f;hp=af4db6daafebd1b22b08502e3d8a877b53df7f47;hpb=6c8e42944a5dcc0c83412a816f0ffe5b3e1bb43e;p=platform%2Fupstream%2Fgst-plugins-good.git diff --git a/ext/pulse/pulsedevicemonitor.c b/ext/pulse/pulsedevicemonitor.c index af4db6d..b4ee819 100644 --- a/ext/pulse/pulsedevicemonitor.c +++ b/ext/pulse/pulsedevicemonitor.c @@ -282,7 +282,11 @@ context_subscribe_cb (pa_context * context, pa_subscription_event_type_t type, for (item = monitor->devices; item; item = item->next) { dev = item->data; - if (dev->device_index == idx) { + if (((facility == PA_SUBSCRIPTION_EVENT_SOURCE && + dev->type == GST_PULSE_DEVICE_TYPE_SOURCE) || + (facility == PA_SUBSCRIPTION_EVENT_SINK && + dev->type == GST_PULSE_DEVICE_TYPE_SINK)) && + dev->device_index == idx) { gst_object_ref (dev); break; } @@ -629,6 +633,7 @@ gst_pulse_device_new (guint device_index, const gchar * device_name, "display-name", device_name, "caps", caps, "klass", klass, "internal-name", internal_name, NULL); + gstdev->type = type; gstdev->device_index = device_index; gstdev->element = element;