automatic version update by autodist [release 21.12.2-1mamba;Sun Feb 06 2022]
This commit is contained in:
parent
1ceb56b948
commit
0889698d09
72
k3b-21.12.2-ffmpeg-5.0.patch
Normal file
72
k3b-21.12.2-ffmpeg-5.0.patch
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
diff -up k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.omv~ k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp
|
||||||
|
--- k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp.omv~ 2022-01-17 19:44:11.314744839 +0100
|
||||||
|
+++ k3b-21.12.1/plugins/decoder/ffmpeg/k3bffmpegwrapper.cpp 2022-01-17 19:55:07.045724184 +0100
|
||||||
|
@@ -38,7 +38,20 @@ extern "C" {
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
|
+#if LIBAVCODEC_VERSION_MAJOR < 59
|
||||||
|
#define FFMPEG_CODEC(s) (s->codec)
|
||||||
|
+#else
|
||||||
|
+static QMap<AVStream*,AVCodecContext*> k3b_codec_contexts;
|
||||||
|
+static inline AVCodecContext *FFMPEG_CODEC(AVStream *s) {
|
||||||
|
+ if(!k3b_codec_contexts.contains(s)) {
|
||||||
|
+ const AVCodec *codec = avcodec_find_decoder(s->codecpar->codec_id);
|
||||||
|
+ AVCodecContext *ctx = avcodec_alloc_context3(codec);
|
||||||
|
+ avcodec_parameters_to_context(ctx, s->codecpar);
|
||||||
|
+ k3b_codec_contexts.insert(s, ctx);
|
||||||
|
+ }
|
||||||
|
+ return k3b_codec_contexts.value(s);
|
||||||
|
+}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_FFMPEG_AVFORMAT_OPEN_INPUT
|
||||||
|
// this works because the parameters/options are not used
|
||||||
|
@@ -70,7 +83,7 @@ class K3bFFMpegFile::Private
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
::AVFormatContext* formatContext;
|
||||||
|
- ::AVCodec* codec;
|
||||||
|
+ const ::AVCodec* codec;
|
||||||
|
::AVStream *audio_stream;
|
||||||
|
|
||||||
|
K3b::Msf length;
|
||||||
|
@@ -320,11 +333,28 @@ int K3bFFMpegFile::fillOutputBuffer()
|
||||||
|
}
|
||||||
|
|
||||||
|
int gotFrame = 0;
|
||||||
|
+#if LIBAVCODEC_VERSION_MAJOR < 59
|
||||||
|
int len = ::avcodec_decode_audio4(
|
||||||
|
FFMPEG_CODEC(d->audio_stream),
|
||||||
|
d->frame,
|
||||||
|
&gotFrame,
|
||||||
|
&d->packet );
|
||||||
|
+#else
|
||||||
|
+ int ret = ::avcodec_receive_frame(
|
||||||
|
+ FFMPEG_CODEC(d->audio_stream),
|
||||||
|
+ d->frame);
|
||||||
|
+
|
||||||
|
+ gotFrame = (ret == 0);
|
||||||
|
+
|
||||||
|
+ ret = avcodec_send_packet(
|
||||||
|
+ FFMPEG_CODEC(d->audio_stream),
|
||||||
|
+ &d->packet );
|
||||||
|
+ if (ret < 0) {
|
||||||
|
+ qDebug() << "(K3bFFMpegFile) decoding failed for " << m_filename;
|
||||||
|
+ return -1;
|
||||||
|
+ }
|
||||||
|
+ int len = d->packet.size;
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
if( d->packetSize <= 0 || len < 0 )
|
||||||
|
::av_packet_unref( &d->packet );
|
||||||
|
@@ -393,7 +423,9 @@ bool K3bFFMpegFile::seek( const K3b::Msf
|
||||||
|
|
||||||
|
K3bFFMpegWrapper::K3bFFMpegWrapper()
|
||||||
|
{
|
||||||
|
+#if LIBAVCODEC_VERSION_MAJOR < 59
|
||||||
|
::av_register_all();
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
7
k3b.spec
7
k3b.spec
@ -1,7 +1,7 @@
|
|||||||
%define dirver %(echo %version | sed "s,alpha.*,,;s,rc.*,,")
|
%define dirver %(echo %version | sed "s,alpha.*,,;s,rc.*,,")
|
||||||
%define pkgver %(echo %version | sed "s|[a-z]||")
|
%define pkgver %(echo %version | sed "s|[a-z]||")
|
||||||
Name: k3b
|
Name: k3b
|
||||||
Version: 21.12.1
|
Version: 21.12.2
|
||||||
Release: 1mamba
|
Release: 1mamba
|
||||||
Summary: The CD/DVD/Blu-Ray Creator for KDE
|
Summary: The CD/DVD/Blu-Ray Creator for KDE
|
||||||
License: GPL
|
License: GPL
|
||||||
@ -15,6 +15,7 @@ Patch0: %{name}-1.0.4-configure_ffmpeg.patch
|
|||||||
Patch1: k3b-2.0.2-ffmpeg.patch
|
Patch1: k3b-2.0.2-ffmpeg.patch
|
||||||
Patch2: k3b-2.0.3-disable-lsof-check.patch
|
Patch2: k3b-2.0.3-disable-lsof-check.patch
|
||||||
Patch3: k3b-2.0.3a-CMakeLists.patch
|
Patch3: k3b-2.0.3a-CMakeLists.patch
|
||||||
|
Patch4: k3b-21.12.2-ffmpeg-5.0.patch
|
||||||
## AUTOBUILDREQ-BEGIN
|
## AUTOBUILDREQ-BEGIN
|
||||||
BuildRequires: glibc-devel
|
BuildRequires: glibc-devel
|
||||||
BuildRequires: libQt5WebKit-devel
|
BuildRequires: libQt5WebKit-devel
|
||||||
@ -136,6 +137,7 @@ This package contains static libraries and header files needed for development.
|
|||||||
#%patch1 -p1
|
#%patch1 -p1
|
||||||
%patch2 -p1
|
%patch2 -p1
|
||||||
#%patch3 -p1
|
#%patch3 -p1
|
||||||
|
%patch4 -p1 -b .ffmpeg-5.0
|
||||||
|
|
||||||
#rm -f doc/*/CMakeLists.txt
|
#rm -f doc/*/CMakeLists.txt
|
||||||
|
|
||||||
@ -216,6 +218,9 @@ exit 0
|
|||||||
%doc ChangeLog
|
%doc ChangeLog
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sun Feb 06 2022 Automatic Build System <autodist@mambasoft.it> 21.12.2-1mamba
|
||||||
|
- automatic version update by autodist
|
||||||
|
|
||||||
* Thu Jan 06 2022 Automatic Build System <autodist@mambasoft.it> 21.12.1-1mamba
|
* Thu Jan 06 2022 Automatic Build System <autodist@mambasoft.it> 21.12.1-1mamba
|
||||||
- automatic version update by autodist
|
- automatic version update by autodist
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user