diff options
author | Paul Kocialkowski <contact@paulk.fr> | 2014-03-24 12:15:33 +0100 |
---|---|---|
committer | Javier Ferrer <javi.f.o@gmail.com> | 2014-03-24 14:36:10 +0100 |
commit | 0aed9830d0c2e7f3c9d4cdaa77bb89b0d519ff34 (patch) | |
tree | 39c2a1f219864abfb5932fe73b170fa7caaadaab | |
parent | 32ed0f56bc77bf5817e5cdc9d40f7a4082cc9544 (diff) | |
download | device_samsung_smdk4412-common-0aed9830d0c2e7f3c9d4cdaa77bb89b0d519ff34.zip device_samsung_smdk4412-common-0aed9830d0c2e7f3c9d4cdaa77bb89b0d519ff34.tar.gz device_samsung_smdk4412-common-0aed9830d0c2e7f3c9d4cdaa77bb89b0d519ff34.tar.bz2 |
smdk4412-common: camera: Proper recording memory release
Change-Id: I4cb029f64564a6e5e41b36af6bdb3f35ac1fc464
-rw-r--r-- | camera/exynos_camera.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/camera/exynos_camera.c b/camera/exynos_camera.c index a15d904..7e551dc 100644 --- a/camera/exynos_camera.c +++ b/camera/exynos_camera.c @@ -3812,6 +3812,7 @@ complete: void exynos_camera_recording_thread_stop(struct exynos_camera *exynos_camera) { + camera_memory_t *memory; int i; if (exynos_camera == NULL) @@ -3824,6 +3825,8 @@ void exynos_camera_recording_thread_stop(struct exynos_camera *exynos_camera) return; } + memory = exynos_camera->recording_memory; + if (exynos_camera->recording_listener != NULL) { exynos_camera_capture_listener_unregister(exynos_camera, exynos_camera->recording_listener); exynos_camera->recording_listener = NULL; @@ -3851,6 +3854,11 @@ void exynos_camera_recording_thread_stop(struct exynos_camera *exynos_camera) pthread_mutex_destroy(&exynos_camera->recording_mutex); pthread_mutex_destroy(&exynos_camera->recording_lock_mutex); + + if (memory != NULL && memory->release != NULL) { + memory->release(memory); + exynos_camera->recording_memory = NULL; + } } // Auto-focus |