From c481fe70593f9548ecd8070563ea5864d5bdf75e Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Sat, 18 Nov 2023 18:51:04 +0100 Subject: [PATCH] camerabin: Correctly relink viewfinderbin_queue This reverts a part of de92a6c7f2. Unlike `image_filter` and `video_filter`, `viewfinder_filter` does not get linked to `src` but `viewfinderbin_queue`. Thus the fix in the mentioned commit does not apply for it and should be reverted. This was not spotted earlier as only the other filters are used in the project that uncovered the issue. Fixes: de92a6c7f2 ("camerabin: Fix source updates with user filters") Part-of: --- .../gst/camerabin2/gstcamerabin2.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst/camerabin2/gstcamerabin2.c b/subprojects/gst-plugins-bad/gst/camerabin2/gstcamerabin2.c index 6a671948e3..f05192be5e 100644 --- a/subprojects/gst-plugins-bad/gst/camerabin2/gstcamerabin2.c +++ b/subprojects/gst-plugins-bad/gst/camerabin2/gstcamerabin2.c @@ -1751,20 +1751,11 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera) "notify::ready-for-capture", G_CALLBACK (gst_camera_bin_src_notify_readyforcapture), camera); - if (camera->viewfinder_filter) { - if (!gst_element_link_pads (camera->src, "vfsrc", - camera->viewfinder_filter, NULL)) { - GST_ERROR_OBJECT (camera, - "Failed to link camera source's vfsrc pad to viewfinder filter"); - goto fail; - } - } else { - if (!gst_element_link_pads (camera->src, "vfsrc", - camera->viewfinderbin_queue, "sink")) { - GST_ERROR_OBJECT (camera, - "Failed to link camera source's vfsrc pad to viewfinder queue"); - goto fail; - } + if (!gst_element_link_pads (camera->src, "vfsrc", + camera->viewfinderbin_queue, "sink")) { + GST_ERROR_OBJECT (camera, + "Failed to link camera source's vfsrc pad to viewfinder queue"); + goto fail; } if (camera->image_filter) {