From 18602e6e4e24cc37ab17a4bda80ff0151204e07d Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 10 Mar 2011 11:38:18 -0300 Subject: [PATCH] wrappercamerabinsrc: Avoid clearing recording caps When recording 2 videos in sequence with the same video-capture-caps, the second video would get a not-negotiated error because the src caps were being cleared without any intention of renegotiating it back to the requested capture caps. This patch avoids this caps reset procedure unless a new caps was set. --- gst/camerabin2/gstwrappercamerabinsrc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c index 591deb2229..74ff324d53 100644 --- a/gst/camerabin2/gstwrappercamerabinsrc.c +++ b/gst/camerabin2/gstwrappercamerabinsrc.c @@ -922,11 +922,11 @@ gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc) } else if (src->mode == MODE_VIDEO) { GstCaps *caps = NULL; - g_mutex_unlock (camerasrc->capturing_mutex); - gst_wrapper_camera_bin_reset_video_src_caps (src, NULL); - g_mutex_lock (camerasrc->capturing_mutex); - if (src->video_renegotiate) { + g_mutex_unlock (camerasrc->capturing_mutex); + gst_wrapper_camera_bin_reset_video_src_caps (src, NULL); + g_mutex_lock (camerasrc->capturing_mutex); + /* clean capsfilter caps so they don't interfere here */ g_object_set (src->src_filter, "caps", NULL, NULL); if (src->src_zoom_filter)