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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5689>
This commit is contained in:
Robert Mader 2023-11-18 18:51:04 +01:00 committed by GStreamer Marge Bot
parent 890d59e97e
commit c481fe7059

View file

@ -1751,21 +1751,12 @@ gst_camera_bin_create_elements (GstCameraBin2 * camera)
"notify::ready-for-capture", "notify::ready-for-capture",
G_CALLBACK (gst_camera_bin_src_notify_readyforcapture), camera); 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", if (!gst_element_link_pads (camera->src, "vfsrc",
camera->viewfinderbin_queue, "sink")) { camera->viewfinderbin_queue, "sink")) {
GST_ERROR_OBJECT (camera, GST_ERROR_OBJECT (camera,
"Failed to link camera source's vfsrc pad to viewfinder queue"); "Failed to link camera source's vfsrc pad to viewfinder queue");
goto fail; goto fail;
} }
}
if (camera->image_filter) { if (camera->image_filter) {
if (!gst_element_link_pads (camera->src, "imgsrc", if (!gst_element_link_pads (camera->src, "imgsrc",