mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
camerabin: mode can be only image or video
No need to check if camerabin is on video mode if it isn't on image mode as those are the only 2 modes available. Additionally, if mode gets corrupted somehow and would be neither image or video it would cause a null pointer dereferencing some lines of code below, so this is safer.
This commit is contained in:
parent
895c07ef04
commit
07279bac7b
1 changed files with 2 additions and 2 deletions
|
@ -3520,7 +3520,7 @@ gst_camerabin_set_property (GObject * object, guint prop_id,
|
|||
prev_pipe = &camera->preview_pipeline;
|
||||
preview_source_filter = &camera->app_preview_source_filter;
|
||||
prev_caps = &camera->preview_caps;
|
||||
} else if (camera->mode == MODE_VIDEO) {
|
||||
} else { /* MODE VIDEO */
|
||||
prev_pipe = &camera->video_preview_pipeline;
|
||||
preview_source_filter = &camera->app_video_preview_source_filter;
|
||||
prev_caps = &camera->video_preview_caps;
|
||||
|
@ -3562,7 +3562,7 @@ gst_camerabin_set_property (GObject * object, guint prop_id,
|
|||
preview_pipe = &camera->preview_pipeline;
|
||||
preview_source_filter = &camera->app_preview_source_filter;
|
||||
preview_caps = camera->preview_caps;
|
||||
} else if (camera->mode == MODE_VIDEO) {
|
||||
} else { /* MODE VIDEO */
|
||||
preview_pipe = &camera->video_preview_pipeline;
|
||||
preview_source_filter = &camera->app_video_preview_source_filter;
|
||||
preview_caps = camera->video_preview_caps;
|
||||
|
|
Loading…
Reference in a new issue