mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
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:
parent
cc09cd1303
commit
37bac4c1ed
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue