From 618f32ad8d53b32b5e7cce1e2a433db0ff887303 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Fri, 24 Sep 2010 16:28:13 -0300 Subject: [PATCH] camerabin: Reset pre-night-mode stored fps when mode changes When switching between video/still modes the pre-night-mode fps should be reset to prevent it being used in the incorrect mode, causing the videosource to fail configuring itself --- gst/camerabin/gstcamerabin.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 2422d3b..0753167 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -982,6 +982,11 @@ gst_camerabin_change_mode (GstCameraBin * camera, gint mode) mode, camera->mode); /* Interrupt ongoing capture */ gst_camerabin_do_stop (camera); + + /* reset night-mode stored values */ + camera->pre_night_fps_n = 0; + camera->pre_night_fps_d = 1; + camera->mode = mode; gst_element_get_state (GST_ELEMENT (camera), &state, &pending_state, 0); if (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING || -- 2.7.4