Use value of hcamcorder->sound_focus_id instead of 0 when acquiring or releasing... 25/92725/1
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 18 Oct 2016 08:16:26 +0000 (17:16 +0900)
committerSangchul Lee <sc11.lee@samsung.com>
Tue, 18 Oct 2016 08:31:57 +0000 (17:31 +0900)
Previously, value 0 is used for the first parameter(id) of mm_sound_acquire_focus()/mm_sound_release_focus().
As a result, it caused misbehavior of session backward compatibility. Now it is fixed corretly.

[Version] 0.10.82
[Profile] Common
[Issue Type] Bug fix
[Dependency module] N/A
[Dependency commit] N/A
[Test] [M(T) - Boot=(OK), sdb=(OK), Home=(OK), Touch=(OK), Version=tizen-mobile_20161016.2]

Change-Id: I0db7fdeb122764f377a835c505f776568d01b557
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/libmm-camcorder.spec
src/mm_camcorder_internal.c

index b8ddac1..dabdf82 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libmm-camcorder
 Summary:    Camera and recorder library
-Version:    0.10.81
+Version:    0.10.82
 Release:    0
 Group:      Multimedia/Libraries
 License:    Apache-2.0
index 0b46d7c..7a25950 100644 (file)
@@ -905,7 +905,7 @@ int _mmcamcorder_realize(MMHandleType handle)
                        /* acquire sound focus */
                        _mmcam_dbg_log("PAUSE_OTHERS - acquire sound focus");
 
-                       ret_sound = mm_sound_acquire_focus(0, FOCUS_FOR_BOTH, NULL);
+                       ret_sound = mm_sound_acquire_focus(hcamcorder->sound_focus_id, FOCUS_FOR_BOTH, NULL);
                        if (ret_sound != MM_ERROR_NONE) {
                                _mmcam_dbg_err("mm_sound_acquire_focus failed [0x%x]", ret_sound);
 
@@ -1256,7 +1256,7 @@ _ERR_CAMCORDER_CMD_PRECON_AFTER_LOCK:
        }
 
        if (hcamcorder->acquired_focus > 0) {
-               mm_sound_release_focus(0, hcamcorder->acquired_focus, NULL);
+               mm_sound_release_focus(hcamcorder->sound_focus_id, hcamcorder->acquired_focus, NULL);
                _mmcam_dbg_warn("release sound focus [focus %d] done", hcamcorder->acquired_focus);
                hcamcorder->acquired_focus = 0;
        }
@@ -1399,7 +1399,7 @@ int _mmcamcorder_unrealize(MMHandleType handle)
                }
 
                if (hcamcorder->acquired_focus > 0) {
-                       mm_sound_release_focus(0, hcamcorder->acquired_focus, NULL);
+                       mm_sound_release_focus(hcamcorder->sound_focus_id, hcamcorder->acquired_focus, NULL);
                        _mmcam_dbg_warn("release sound focus [focus %d] done", hcamcorder->acquired_focus);
                        hcamcorder->acquired_focus = 0;
                }