Gstreamer: Fix gst_mini_object_unref

This commit is contained in:
kkz 2021-07-14 16:33:45 +08:00
parent c120e2f094
commit bd9eafc060
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,30 @@
From d84c7d09df16d5e60cd5067005ec97498f8b4e32 Mon Sep 17 00:00:00 2001
From: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
Date: Wed, 22 Aug 2018 10:25:39 +0200
Subject: [PATCH] Gstreamer: Fix gst_mini_object_unref: assertion refcount > 0
failed
gst_value_get_sample does not return a reference to the sample.
Should not call gst_sample_unref.
Change-Id: Ibf71e6844b5756d85aac541a68e4e4ae4eefe498
Reviewed-by: Christian Stromme <christian.stromme@qt.io>
---
src/plugins/gstreamer/camerabin/camerabinsession.cpp | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/plugins/gstreamer/camerabin/camerabinsession.cpp b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
index cfbc94bb4..1c14444bb 100644
--- a/src/plugins/gstreamer/camerabin/camerabinsession.cpp
+++ b/src/plugins/gstreamer/camerabin/camerabinsession.cpp
@@ -997,7 +997,6 @@ bool CameraBinSession::processSyncMessage(const QGstreamerMessage &message)
GstVideoInfo previewInfo;
if (gst_video_info_from_caps(&previewInfo, previewCaps))
image = QGstUtils::bufferToImage(buffer, previewInfo);
- gst_sample_unref(sample);
#else
image = QGstUtils::bufferToImage(buffer);
gst_buffer_unref(buffer);
--
2.20.1

View File

@ -4,12 +4,12 @@
Name: qt5-qtmultimedia
Version: 5.11.1
Release: 6
Release: 7
Summary: Qt5 multimedia support
License: LGPLv2 with exceptions or GPLv3 with exceptions
Url: http://www.qt.io
Source0: https://download.qt.io/new_archive/qt/5.11/5.11.1/submodules/qtmultimedia-everywhere-src-%{version}.tar.xz
Patch0: Fix-gst_mini_object_unref.patch
BuildRequires: qt5-qtbase-devel >= %{version} qt5-qtbase-private-devel
BuildRequires: qt5-qtdeclarative-devel >= %{version} pkgconfig(alsa) pkgconfig(gstreamer-1.0)
BuildRequires: pkgconfig(gstreamer-app-1.0) pkgconfig(gstreamer-audio-1.0)
@ -84,6 +84,9 @@ popd
%endif
%changelog
* Wed Jul 14 2021 zhaoshuang <zhaoshuang@uniontech.com> - 5.11.1-7
- Add patch Fix-gst_mini_object_unref to fix gstreamer related issue
* Mon Sep 14 2020 liuweibo <liuweibo10@huawei.com> - 5.11.1-6
- Fix Source0