mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
camerabin: Add an assertion to preview pipeline generation
Adds an assertion in case the preview pipeline is NULL and also explicitly initializes preview caps to NULL for clarity.
This commit is contained in:
parent
48e8c093dc
commit
fbe4f5f610
2 changed files with 3 additions and 0 deletions
|
@ -206,6 +206,7 @@ gst_camerabin_preview_convert (GstCameraBinPreviewPipelineData * data,
|
|||
GstFlowReturn fret;
|
||||
|
||||
g_return_val_if_fail (GST_BUFFER_CAPS (buf) != NULL, NULL);
|
||||
g_return_val_if_fail (data != NULL, NULL);
|
||||
|
||||
if (data->pipeline == NULL) {
|
||||
GST_WARNING ("pipeline is NULL");
|
||||
|
|
|
@ -3320,6 +3320,8 @@ gst_camerabin_init (GstCameraBin * camera, GstCameraBinClass * gclass)
|
|||
camera->pad_view_vid = NULL;
|
||||
|
||||
camera->video_preview_buffer = NULL;
|
||||
camera->preview_caps = NULL;
|
||||
camera->video_preview_caps = NULL;
|
||||
|
||||
/* image capture bin */
|
||||
camera->imgbin = g_object_new (GST_TYPE_CAMERABIN_IMAGE, NULL);
|
||||
|
|
Loading…
Reference in a new issue