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.
This commit is contained in:
Thiago Santos 2011-03-10 11:38:18 -03:00
parent 935675a060
commit 18602e6e4e

View file

@ -922,11 +922,11 @@ gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc)
} else if (src->mode == MODE_VIDEO) { } else if (src->mode == MODE_VIDEO) {
GstCaps *caps = NULL; GstCaps *caps = NULL;
if (src->video_renegotiate) {
g_mutex_unlock (camerasrc->capturing_mutex); g_mutex_unlock (camerasrc->capturing_mutex);
gst_wrapper_camera_bin_reset_video_src_caps (src, NULL); gst_wrapper_camera_bin_reset_video_src_caps (src, NULL);
g_mutex_lock (camerasrc->capturing_mutex); g_mutex_lock (camerasrc->capturing_mutex);
if (src->video_renegotiate) {
/* clean capsfilter caps so they don't interfere here */ /* clean capsfilter caps so they don't interfere here */
g_object_set (src->src_filter, "caps", NULL, NULL); g_object_set (src->src_filter, "caps", NULL, NULL);
if (src->src_zoom_filter) if (src->src_zoom_filter)