Fix to start stream corked to avoid early drain complete 00/226200/4
authorSeungbae Shin <seungbae.shin@samsung.com>
Thu, 27 Feb 2020 11:34:14 +0000 (20:34 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 28 Feb 2020 04:42:28 +0000 (13:42 +0900)
For short file playback, drain operation can be completed to early prior to actual stream start.
This is due to connecting playback stream with uncorked.
In this situation, stream handle will not be valid any more and finally crash occurred.
To fix this issue, stream should be started with corked state.

[Version] 0.12.62
[Issue Type] Bug

Change-Id: I32f0748dc64ce822a4fa277d957792dfecb5a323

packaging/libmm-sound.spec
server/plugin/wav/mm_sound_plugin_codec_wave.c

index 805ad8da63e4affc37e45a577d11d096f12da265..a479f0ea4ebe924b72cfd558f8662f6e4d7064a2 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.61
+Version:    0.12.62
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
index 5418cd0c6096b16a63bc9843c8150b8e72023143..933d5db5388296374a60ac6f77184e042670818a 100644 (file)
@@ -404,8 +404,8 @@ static int _pa_stream_connect(wave_info_t *h)
        pa_stream_set_buffer_attr_callback(s, _pa_stream_buffer_attr_callback, h);
 
        ret = pa_stream_connect_playback(s, NULL, NULL,
-                                                       PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE,
-                                                       NULL, NULL);
+               PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_ADJUST_LATENCY | PA_STREAM_AUTO_TIMING_UPDATE | PA_STREAM_START_CORKED,
+               NULL, NULL);
        if (ret < 0) {
                debug_error("failed to pa_stream_connect_playback(), ret(%d)", ret);
                goto error;