Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package wxsvg for openSUSE:Factory checked 
in at 2022-07-13 13:45:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/wxsvg (Old)
 and      /work/SRC/openSUSE:Factory/.wxsvg.new.1523 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "wxsvg"

Wed Jul 13 13:45:33 2022 rev:9 rq:988903 version:1.5.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/wxsvg/wxsvg.changes      2022-04-16 
00:16:02.581792808 +0200
+++ /work/SRC/openSUSE:Factory/.wxsvg.new.1523/wxsvg.changes    2022-07-13 
13:45:58.782082182 +0200
@@ -1,0 +2,6 @@
+Tue Jul 12 20:03:03 UTC 2022 - Bj??rn Lie <[email protected]>
+
+- Add ffmpeg5.patch: Fix build with ffmpeg5, patch from gentoo
+  
https://gitweb.gentoo.org/repo/gentoo.git/plain/media-libs/wxsvg/files/ffmpeg5.patch?id=d6fd9cfb26299c76be7483cac4451a226ab8e37f
+
+-------------------------------------------------------------------

New:
----
  ffmpeg5.patch

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

Other differences:
------------------
++++++ wxsvg.spec ++++++
--- /var/tmp/diff_new_pack.yibPLK/_old  2022-07-13 13:45:59.286082897 +0200
+++ /var/tmp/diff_new_pack.yibPLK/_new  2022-07-13 13:45:59.290082903 +0200
@@ -26,6 +26,7 @@
 License:        LGPL-2.1-or-later WITH WxWindows-exception-3.1
 URL:            http://wxsvg.sourceforge.net/
 Source:         
https://prdownloads.sourceforge.net/wxsvg/%{name}-%{version}.tar.bz2
+Patch:          ffmpeg5.patch
 BuildRequires:  gcc-c++
 BuildRequires:  pkgconfig
 BuildRequires:  wxWidgets-3_0-devel
@@ -61,6 +62,7 @@
 
 %prep
 %setup -q
+%patch -p1
 
 %build
 %configure --disable-static

++++++ ffmpeg5.patch ++++++
Index: wxsvg-1.5.23/include/wxSVG/mediadec_ffmpeg.h
===================================================================
--- wxsvg-1.5.23.orig/include/wxSVG/mediadec_ffmpeg.h
+++ wxsvg-1.5.23/include/wxSVG/mediadec_ffmpeg.h
@@ -81,6 +81,7 @@ private:
        bool OpenVideoDecoder();
        void CloseVideoDecoder();
        AVStream* GetVideoStream();
+       int64_t m_cur_dts;
 };
 
 #endif //FFMPEG_MEDIA_DECODER_H
Index: wxsvg-1.5.23/src/mediadec_ffmpeg.cpp
===================================================================
--- wxsvg-1.5.23.orig/src/mediadec_ffmpeg.cpp
+++ wxsvg-1.5.23/src/mediadec_ffmpeg.cpp
@@ -20,6 +20,7 @@
 #define UINT64_C(val) val##ULL
 #endif
 extern "C" {
+#include <libavcodec/avcodec.h>
 #include <libavformat/avformat.h>
 #include <libswscale/swscale.h>
 #include <libavutil/avutil.h>
@@ -153,6 +154,9 @@ StreamType wxFfmpegMediaDecoder::GetStre
 }
 
 wxString wxFfmpegMediaDecoder::GetCodecName(unsigned int streamIndex) {
+#if LIBAVCODEC_VERSION_MAJOR >= 59
+       const
+#endif
        AVCodec *codec = 
avcodec_find_decoder(m_formatCtx->streams[streamIndex]->codecpar->codec_id);
        if (codec) {
                return wxString(codec->name, wxConvLocal);
@@ -193,6 +197,9 @@ bool wxFfmpegMediaDecoder::OpenVideoDeco
        
        // find and open the decoder for the video stream 
        AVStream* stream = m_formatCtx->streams[m_videoStream];
+#if LIBAVCODEC_VERSION_MAJOR >= 59
+       const
+#endif
        AVCodec* codec = avcodec_find_decoder(stream->codecpar->codec_id);
        if (!codec)
                return false;
@@ -255,7 +262,11 @@ double wxFfmpegMediaDecoder::GetPosition
        AVStream *st = GetVideoStream();
        if (st == NULL)
                return -1;
+#if LIBAVCODEC_VERSION_MAJOR >= 59
+       int64_t timestamp = m_cur_dts;
+#else
        int64_t timestamp = st->cur_dts;
+#endif
        if (timestamp == (int64_t)AV_NOPTS_VALUE)
                return -1;
        timestamp = av_rescale(timestamp, AV_TIME_BASE * 
(int64_t)st->time_base.num, st->time_base.den);
@@ -308,6 +319,7 @@ wxImage wxFfmpegMediaDecoder::GetNextFra
                                uint8_t *rgbSrc[3] = { img.GetData(), NULL, 
NULL };
                                int rgbStride[3] = { 3 * m_width, 0, 0 };
                                sws_scale(imgConvertCtx, m_frame->data, 
m_frame->linesize, 0, m_codecCtx->height, rgbSrc, rgbStride);
+                               m_cur_dts = packet.dts;
                                av_packet_unref(&packet);
                                sws_freeContext(imgConvertCtx);
                                return img;

Reply via email to