commit 845fd77600d3bcebea0f10d6853b08c89e56b8fd
Author: Thomas Moschny <thomas.moschny(a)gmx.de>
Date: Wed Nov 22 19:19:00 2017 +0100
Fix patch for older libavcodec.
Force building with gcc/g++ instead of clang.
.gitignore | 4 +---
guvcview.spec | 12 +++++++++---
...e-to-new-libavcodec-API-with-decoupled-input-ou-fix.patch | 12 ++++++++++++
3 files changed, 22 insertions(+), 6 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5a326cb..29800a8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1 @@
-guvcview-src-2.0.1.tar.gz
-guvcview-src-2.0.4.tar.gz
-/guvcview-src-2.0.5.tar.gz
+/guvcview-src-*.tar.gz
diff --git a/guvcview.spec b/guvcview.spec
index 3ed366b..3e4a745 100644
--- a/guvcview.spec
+++ b/guvcview.spec
@@ -1,6 +1,6 @@
Name: guvcview
Version: 2.0.5
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: GTK+ UVC Viewer and Capturer
Group: Amusements/Graphics
# fixme: ask upstream about license, many source files claim to be
@@ -9,12 +9,13 @@ License: GPLv3+
URL:
http://guvcview.sourceforge.net/
Source0:
http://downloads.sourceforge.net/%{name}/%{name}-src-%{version}.tar.gz
Patch0: update-to-new-libavcodec-API-with-decoupled-input-ou.patch
+Patch1: update-to-new-libavcodec-API-with-decoupled-input-ou-fix.patch
BuildRequires: pkgconfig(gtk+-3.0) >= 3.0.0
BuildRequires: pkgconfig(glib-2.0) >= 2.10.0
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(libpulse) >= 0.9.15
BuildRequires: pkgconfig(libpng)
-BuildRequires: pkgconfig(libavcodec)
+BuildRequires: pkgconfig(libavcodec) >= 57.16
BuildRequires: pkgconfig(libavutil)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(libudev)
@@ -52,11 +53,12 @@ This package contains development files for %{name}.
%prep
%setup -q -n %{name}-src-%{version}
%patch0 -p1
+%patch1 -p1
find . \( -name '*.h' -o -name '*.c' \) -exec chmod -x {} \;
%build
-%configure --disable-debian-menu --disable-silent-rules --disable-static
+%configure CC=gcc CXX=g++ --disable-debian-menu --disable-silent-rules --disable-static
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g'
libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
make -k %{?_smp_mflags}
@@ -121,6 +123,10 @@ find %{buildroot} -name '*.la' -exec rm -f {} ';'
%changelog
+* Wed Nov 22 2017 Thomas Moschny <thomas.moschny(a)gmx.de> - 2.0.5-2
+- Fix patch for older libavcodec.
+- Force building with gcc/g++ instead of clang.
+
* Thu Nov 16 2017 Leigh Scott <leigh123linux(a)googlemail.com> - 2.0.5-1
- Updated to 2.0.5
- Add upstream patch for newer libavcodec
diff --git a/update-to-new-libavcodec-API-with-decoupled-input-ou-fix.patch
b/update-to-new-libavcodec-API-with-decoupled-input-ou-fix.patch
new file mode 100644
index 0000000..f660b24
--- /dev/null
+++ b/update-to-new-libavcodec-API-with-decoupled-input-ou-fix.patch
@@ -0,0 +1,12 @@
+diff -up guvcview-src-2.0.5/gview_v4l2core/frame_decoder.c~
guvcview-src-2.0.5/gview_v4l2core/frame_decoder.c
+--- guvcview-src-2.0.5/gview_v4l2core/frame_decoder.c~ 2017-11-22 18:42:19.328936202
+0100
++++ guvcview-src-2.0.5/gview_v4l2core/frame_decoder.c 2017-11-22 18:51:42.366466677
+0100
+@@ -1063,7 +1063,7 @@ int libav_decode(AVCodecContext *avctx,
+
+ #else
+
+- return avcodec_decode_video2(dec_ctx, frame, got_picture, pkt);
++ return avcodec_decode_video2(avctx, frame, got_frame, pkt);
+
+ #endif
+ }