mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
camerabin: cleanup used caps when going to NULL
Resets used caps so that camerabin doesn't try to use them when restarting, where elements/properties might have changed and the old caps be incompatible
This commit is contained in:
parent
ca16d951ba
commit
73a909c0e3
1 changed files with 9 additions and 0 deletions
|
@ -851,6 +851,15 @@ camerabin_destroy_elements (GstCameraBin * camera)
|
|||
|
||||
camera->active_bin = NULL;
|
||||
|
||||
/* Reset caps data as the elements might be completely different next
|
||||
* time we 'start' */
|
||||
if (camera->view_finder_caps) {
|
||||
gst_caps_replace (&camera->view_finder_caps, NULL);
|
||||
}
|
||||
gst_caps_replace (&camera->allowed_caps, NULL);
|
||||
camera->fps_n = camera->fps_d = 0;
|
||||
camera->width = camera->height = 0;
|
||||
|
||||
/* Remove elements */
|
||||
gst_camerabin_remove_elements_from_bin (GST_BIN (camera));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue