[arch-commits] Commit in tupitube/trunk (PKGBUILD ffmpeg5.patch)

Antonio Rojas arojas at gemini.archlinux.org
Wed Jan 26 20:55:17 UTC 2022


    Date: Wednesday, January 26, 2022 @ 20:55:16
  Author: arojas
Revision: 1116190

ffmpeg 5 rebuild

Added:
  tupitube/trunk/ffmpeg5.patch
Modified:
  tupitube/trunk/PKGBUILD

---------------+
 PKGBUILD      |   10 ++++++--
 ffmpeg5.patch |   65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2022-01-26 20:31:45 UTC (rev 1116189)
+++ PKGBUILD	2022-01-26 20:55:16 UTC (rev 1116190)
@@ -6,7 +6,7 @@
 
 pkgname=tupitube
 pkgver=0.2.18
-pkgrel=1
+pkgrel=2
 pkgdesc='Design and authoring tool for digital artists interested in 2D animation'
 arch=('x86_64')
 url='https://tupitube.com/'
@@ -15,9 +15,11 @@
 makedepends=('ruby-rexml')
 replaces=('tupitube.desk')
 source=("https://downloads.sourceforge.net/tupi2d/$pkgname.desk-$pkgver.tar.gz"
-        'tupitube.appdata.xml')
+        'tupitube.appdata.xml'
+        'ffmpeg5.patch')
 sha256sums=('b765e39426531c383cc88cda62c5331efe5f965d02ec079e55eddd077749a4aa'
-            '99fbafe0b359130d53278db3cada052f8245c325dcb82ce33997322dd750707a')
+            '99fbafe0b359130d53278db3cada052f8245c325dcb82ce33997322dd750707a'
+            'b08c12db5f9c66128f31c398ae5a50d96b4fdfd895b47c62fe0d3dab9325f45a')
 
 prepare() {
   cd $pkgname.desk
@@ -25,6 +27,8 @@
   sed -i 's|quazip-qt5|quazip1-qt5|' qonf/test.rb
   sed -i 's|/share/pixmaps|/share/icons/hicolor/128x128/apps|' qonf/makefile.rb
   sed -i '/require .os/d' qonf/configure.rb
+
+  patch -p1 -i ../ffmpeg5.patch # Fix build with FFmpeg 5
 }
 
 build() {

Added: ffmpeg5.patch
===================================================================
--- ffmpeg5.patch	                        (rev 0)
+++ ffmpeg5.patch	2022-01-26 20:55:16 UTC (rev 1116190)
@@ -0,0 +1,65 @@
+diff --git a/configure.tests/ffmpeg/main.cpp b/configure.tests/ffmpeg/main.cpp
+index 907500d3..42d2eda9 100644
+--- a/configure.tests/ffmpeg/main.cpp
++++ b/configure.tests/ffmpeg/main.cpp
+@@ -43,7 +43,7 @@ extern "C" {
+ 
+ int main()
+ {
+-    AVOutputFormat *format = av_guess_format("ffh264", NULL, NULL);
++    const AVOutputFormat *format = av_guess_format("ffh264", NULL, NULL);
+ 
+     AVFormatContext *formatContext = avformat_alloc_context();
+     formatContext->oformat = format;
+@@ -53,7 +53,7 @@ int main()
+ 
+     stream = avformat_new_stream(formatContext, 0);
+ 
+-    AVCodec *codec = avcodec_find_encoder(stream->codecpar->codec_id);
++    const AVCodec *codec = avcodec_find_encoder(stream->codecpar->codec_id);
+     if (!codec) {
+         av_log(NULL, AV_LOG_ERROR, "Failed to find decoder for stream\n");
+         return AVERROR_DECODER_NOT_FOUND;
+diff --git a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
+index 2ecd5e79..52bd604b 100644
+--- a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
++++ b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.cpp
+@@ -40,6 +40,7 @@
+ #include "talgorithm.h"
+ 
+ #include <QDir>
++#include <QDebug>
+ #include <QTimer>
+ 
+ // Handy documentation about Libav library
+@@ -213,7 +214,6 @@ AVStream * TFFmpegMovieGenerator::addVideoStream()
+         return nullptr;
+     }
+ 
+-    /* SQA: Code pending for review
+     codecContext = avcodec_alloc_context3(codec);
+     if (!codecContext) {
+         qDebug() << "Could not allocate video codec context";
+@@ -223,9 +223,6 @@ AVStream * TFFmpegMovieGenerator::addVideoStream()
+         qDebug() << "Could not copy parameters to context";
+         return nullptr;
+     }
+-    */
+-
+-    codecContext = st->codec;
+ 
+     // Put sample parameters
+     codecContext->bit_rate = 6000000;
+diff --git a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h
+index 257994c2..7bc60251 100644
+--- a/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h
++++ b/src/plugins/export/ffmpegplugin/tffmpegmoviegenerator.h
+@@ -92,7 +92,7 @@ class TUPITUBE_PLUGIN TFFmpegMovieGenerator : public TMovieGenerator
+         AVFrame *videoFrame;
+         AVStream *video_st;
+         AVFormatContext *formatContext;
+-        AVOutputFormat *outputFormat;
++        const AVOutputFormat *outputFormat;
+         AVCodecContext *codecContext;
+         enum AVCodecID videoCodecID;
+         const AVCodec *codec;



More information about the arch-commits mailing list