[0.6.30] register the device connected cb only in case of media stream type 81/113881/1
authorEunhae Choi <eunhae1.choi@samsung.com>
Thu, 9 Feb 2017 05:53:04 +0000 (14:53 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Thu, 9 Feb 2017 07:26:35 +0000 (16:26 +0900)
- this is for backward compatibility

Change-Id: I581b32df941528cc3b4ed466276c5b299773f880

src/mm_player_sound_focus.c

index 73548eb..63f24ff 100644 (file)
@@ -307,7 +307,7 @@ _mmplayer_sound_register(MMPlayerSoundFocus* sound_focus,
                                }
                        }
 
-                       if (sound_focus->connected_id == 0) {
+                       if ((strstr(stream_type, "media")) && (sound_focus->connected_id == 0)) {
                                /* register device connected callback */
                                ret = mm_sound_add_device_connected_callback(MM_SOUND_DEVICE_TYPE_EXTERNAL_FLAG,
                                                (mm_sound_device_connected_cb)__mmplayer_sound_device_connected_cb_func, (void*)param, &sound_focus->connected_id);
@@ -393,4 +393,4 @@ bool _mmplayer_is_using_internal_sound_focus(MMPlayerSoundFocus* sound_focus)
                return true;
        else
                return false;
-}
\ No newline at end of file
+}