tizen-device: Add to initialize related member variable of sink/source before freeing... 73/180573/1 submit/tizen/20180531.062400
authorSangchul Lee <sc11.lee@samsung.com>
Thu, 31 May 2018 02:55:45 +0000 (11:55 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Thu, 31 May 2018 02:57:53 +0000 (11:57 +0900)
[Version] 11.1.6
[Issue Type] Bug fix

Change-Id: Ifd0f354e82b3c96ccf7ccb34f87308e00ae5183a
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/pulseaudio-modules-tizen.spec
src/tizen-device.c

index f38bd5fbfd646400806f8294f089691a5fa89bf2..03a35467eb8931a228c5adb24ffc8afd1f9fe9e0 100644 (file)
@@ -1,7 +1,7 @@
 Name:             pulseaudio-modules-tizen
 Summary:          Pulseaudio modules for Tizen
-Version:          11.1.5
-Release:          1
+Version:          11.1.6
+Release:          0
 Group:            Multimedia/Audio
 License:          LGPL-2.1+
 Source0:          %{name}-%{version}.tar.gz
index 227544045d5780ed980c687f20a0ece7f7d4758e..2204430083820a863446ca0a8f2845ba849349d6 100644 (file)
@@ -562,6 +562,10 @@ int pa_tz_device_remove_source_with_role(pa_tz_device *device, const char *role)
 }
 
 void pa_tz_device_free(pa_tz_device *device) {
+    pa_sink *sink;
+    pa_source *source;
+    void *state;
+
     pa_assert(device);
 
     pa_log_info("Free device type(%s) id(%u) name(%s) system_id(%s)",
@@ -570,6 +574,15 @@ void pa_tz_device_free(pa_tz_device *device) {
     pa_tz_device_dump_info(device, PA_LOG_INFO);
 
     pa_idxset_remove_by_data(device->list, device, NULL);
+
+    if (device->playback_devices)
+        PA_HASHMAP_FOREACH(sink, device->playback_devices, state)
+            sink->device_item = NULL;
+
+    if (device->capture_devices)
+        PA_HASHMAP_FOREACH(source, device->capture_devices, state)
+            source->device_item = NULL;
+
     notify_device_connection_changed(device, false);
 
     pa_xfree(device->type);