Hello community,

here is the log from the commit of package libopenshot for openSUSE:Factory 
checked in at 2020-08-03 14:17:47
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libopenshot (Old)
 and      /work/SRC/openSUSE:Factory/.libopenshot.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libopenshot"

Mon Aug  3 14:17:47 2020 rev:7 rq:823991 version:0.2.5+11

Changes:
--------
--- /work/SRC/openSUSE:Factory/libopenshot/libopenshot.changes  2020-03-14 
09:55:09.719102279 +0100
+++ /work/SRC/openSUSE:Factory/.libopenshot.new.3592/libopenshot.changes        
2020-08-03 14:18:31.980688436 +0200
@@ -1,0 +2,6 @@
+Thu Jul 23 17:56:55 UTC 2020 - Stefan BrĂ¼ns <[email protected]>
+
+- Fix compilation with GCC 10, add
+  Fix-ODR-violation-replace-variable-definition.patch
+
+-------------------------------------------------------------------

New:
----
  Fix-ODR-violation-replace-variable-definition.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libopenshot.spec ++++++
--- /var/tmp/diff_new_pack.pJUqBI/_old  2020-08-03 14:18:32.660689118 +0200
+++ /var/tmp/diff_new_pack.pJUqBI/_new  2020-08-03 14:18:32.664689123 +0200
@@ -26,6 +26,8 @@
 Group:          Productivity/Multimedia/Other
 URL:            https://openshot.org/
 Source0:        libopenshot-%{version}.tar.xz
+# PATCH-FIX-UPSTREAM -- https://github.com/OpenShot/libopenshot/pull/512.patch
+Patch0:         Fix-ODR-violation-replace-variable-definition.patch
 
 BuildRequires:  cmake
 BuildRequires:  cppzmq-devel

++++++ Fix-ODR-violation-replace-variable-definition.patch ++++++
>From 13290364e7bea54164ab83d973951f2898ad9e23 Mon Sep 17 00:00:00 2001
From: Stefan Strogin <[email protected]>
Date: Sat, 16 May 2020 02:33:37 +0300
Subject: [PATCH] FFmpegUtilities: replace variable definition with statement
 expression

It is needed to avoid multiple definitions of AV_GET_CODEC_CONTEXT,
which is considered as an error with '-fno-common' which is default
since gcc-10.

Fixes: #511
---
 include/FFmpegUtilities.h | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)

diff --git a/include/FFmpegUtilities.h b/include/FFmpegUtilities.h
index 62d64df1..b4ec951f 100644
--- a/include/FFmpegUtilities.h
+++ b/include/FFmpegUtilities.h
@@ -163,11 +163,10 @@
                #define AV_FREE_CONTEXT(av_context) 
avcodec_free_context(&av_context)
                #define AV_GET_CODEC_TYPE(av_stream) 
av_stream->codecpar->codec_type
                #define AV_FIND_DECODER_CODEC_ID(av_stream) 
av_stream->codecpar->codec_id
-               auto AV_GET_CODEC_CONTEXT = [](AVStream* av_stream, AVCodec* 
av_codec) { \
-                       AVCodecContext *context = 
avcodec_alloc_context3(av_codec); \
-                       avcodec_parameters_to_context(context, 
av_stream->codecpar); \
-                       return context; \
-               };
+               #define AV_GET_CODEC_CONTEXT(av_stream, av_codec) \
+                       ({ AVCodecContext *context = 
avcodec_alloc_context3(av_codec); \
+                          avcodec_parameters_to_context(context, 
av_stream->codecpar); \
+                          context; })
                #define AV_GET_CODEC_PAR_CONTEXT(av_stream, av_codec) av_codec;
                #define AV_GET_CODEC_FROM_STREAM(av_stream,codec_in)
                #define AV_GET_CODEC_ATTRIBUTES(av_stream, av_context) 
av_stream->codecpar
@@ -199,11 +198,10 @@
                #define AV_FREE_CONTEXT(av_context) 
avcodec_free_context(&av_context)
                #define AV_GET_CODEC_TYPE(av_stream) 
av_stream->codecpar->codec_type
                #define AV_FIND_DECODER_CODEC_ID(av_stream) 
av_stream->codecpar->codec_id
-               auto AV_GET_CODEC_CONTEXT = [](AVStream* av_stream, AVCodec* 
av_codec) { \
-                       AVCodecContext *context = 
avcodec_alloc_context3(av_codec); \
-                       avcodec_parameters_to_context(context, 
av_stream->codecpar); \
-                       return context; \
-               };
+               #define AV_GET_CODEC_CONTEXT(av_stream, av_codec) \
+                       ({ AVCodecContext *context = 
avcodec_alloc_context3(av_codec); \
+                          avcodec_parameters_to_context(context, 
av_stream->codecpar); \
+                          context; })
                #define AV_GET_CODEC_PAR_CONTEXT(av_stream, av_codec) av_codec;
                #define AV_GET_CODEC_FROM_STREAM(av_stream,codec_in)
                #define AV_GET_CODEC_ATTRIBUTES(av_stream, av_context) 
av_stream->codecpar

Reply via email to