From cbcd4e33303f5d7fc2bd6728e79f7e0c3608e06b Mon Sep 17 00:00:00 2001 From: Lasse Laukkanen Date: Mon, 4 May 2009 10:32:10 +0300 Subject: [PATCH] camerabin: stop ongoing capture if changing resolution --- gst/camerabin/gstcamerabin.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 554755893a..d7c6d0328e 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -2937,6 +2937,9 @@ gst_camerabin_user_res_fps (GstCameraBin * camera, gint width, gint height, GST_INFO_OBJECT (camera, "switching resolution to %dx%d and fps to %d/%d", width, height, fps_n, fps_d); + /* Interrupt ongoing capture */ + gst_camerabin_do_stop (camera); + gst_element_get_state (GST_ELEMENT (camera), &state, &pending, 0); if (state == GST_STATE_PAUSED || state == GST_STATE_PLAYING) { GST_INFO_OBJECT (camera,