wrappercamerabinsrc: avoid assertion by using null caps as any

NULL caps aren't valid caps, use a reference to 'any' caps
This commit is contained in:
Thiago Santos 2012-05-02 15:35:05 -03:00
parent cc09cd1303
commit 37bac4c1ed

View file

@ -792,7 +792,9 @@ gst_wrapper_camera_bin_src_set_mode (GstBaseCameraSrc * bcamsrc,
g_object_set (G_OBJECT (photography), "capture-mode", mode, NULL);
}
} else {
gst_wrapper_camera_bin_reset_video_src_caps (self, NULL);
GstCaps *anycaps = gst_caps_new_any ();
gst_wrapper_camera_bin_reset_video_src_caps (self, anycaps);
gst_caps_unref (anycaps);
}
return TRUE;
@ -1002,8 +1004,9 @@ gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc)
GstCaps *caps = NULL;
if (src->video_renegotiate) {
GstCaps *anycaps = gst_caps_new_any ();
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, anycaps);
g_mutex_lock (&camerasrc->capturing_mutex);
/* clean capsfilter caps so they don't interfere here */
@ -1020,6 +1023,7 @@ gst_wrapper_camera_bin_src_start_capture (GstBaseCameraSrc * camerasrc)
gst_wrapper_camera_bin_reset_video_src_caps (src, caps);
g_mutex_lock (&camerasrc->capturing_mutex);
gst_caps_unref (caps);
gst_caps_unref (anycaps);
}
if (src->video_rec_status == GST_VIDEO_RECORDING_STATUS_DONE) {
src->video_rec_status = GST_VIDEO_RECORDING_STATUS_STARTING;