Add break logic for not-good state of virtual stream 61/53161/1
authorMok Jeongho <jho.mok@samsung.com>
Wed, 2 Dec 2015 04:44:16 +0000 (13:44 +0900)
committerMok Jeongho <jho.mok@samsung.com>
Wed, 2 Dec 2015 04:46:53 +0000 (13:46 +0900)
[Version] Release 0.3.31
[Profile] Common
[Issue Type] Add feature

Change-Id: I4254f81b0a4fe72a17c919a87fdb7de471d3aeea

packaging/capi-media-sound-manager.spec
src/sound_manager_private.c

index 1357f1da1633a6bfac2c777853dfcb0ee7bae599..9ee6dce6c5748925142f7dab46f8ad58825a42ed 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       capi-media-sound-manager
 Summary:    Sound Manager library
-Version:    0.3.30
+Version:    0.3.31
 Release:    0
 Group:      Multimedia/API
 License:    Apache-2.0
index 61ac59c1c5c8ab42fa656d4768e2659e8c61f704..cb71e8f129b3ab64288978e074134446a190a33c 100644 (file)
@@ -1791,8 +1791,12 @@ int _start_virtual_stream(virtual_sound_stream_info_s *virtual_stream)
                                state = pa_stream_get_state(virtual_stream->pa_stream[i]);
                                if (state == PA_STREAM_READY)
                                        break;
-                               if (!PA_STREAM_IS_GOOD(state))
+                               if (!PA_STREAM_IS_GOOD(state)) {
+                                       LOGE("stream(%d) is not good, state : %d", i, state);
                                        pa_ret = pa_context_errno(virtual_stream->pa_context);
+                                       ret = MM_ERROR_SOUND_INTERNAL;
+                                       goto ERROR_WITH_UNLOCK;
+                               }
 
                                pa_threaded_mainloop_wait(virtual_stream->pa_mainloop);
                        }