diff options
author | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-09-20 08:42:41 -0300 |
---|---|---|
committer | Thiago Santos <thiago.sousa.santos@collabora.co.uk> | 2010-11-02 09:16:44 -0300 |
commit | 73a909c0e301c0282da34b456ae6c705c0b53092 (patch) | |
tree | cc1ff7caf443dc5bdc65c53b8d24a6f6075bdfc9 | |
parent | ca16d951ba1f28ad9d5e1d0bbfeb36f7ca2387f0 (diff) |
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
-rw-r--r-- | gst/camerabin/gstcamerabin.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c index 375987cda..713a18de7 100644 --- a/gst/camerabin/gstcamerabin.c +++ b/gst/camerabin/gstcamerabin.c @@ -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)); } |