public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
To: git-commits@fedoraproject.org
Subject: [rpms/olive] rawhide: fix build with FFmpeg 9
Date: Sat, 22 Aug 2026 14:12:56 GMT	[thread overview]
Message-ID: <178740797602.1.401336258656269916.rpms-olive-2f6720ef0a6d@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/olive
Branch : rawhide
Commit : 2f6720ef0a6d62e95d2c9b0f0be827a403fa7e0b
Author : Dominik 'Rathann' Mierzejewski <dominik@greysector.net>
Date   : 2026-08-21T18:08:55+02:00
Stats  : +64/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/olive/c/2f6720ef0a6d62e95d2c9b0f0be827a403fa7e0b?branch=rawhide

Log:
fix build with FFmpeg 9

---
diff --git a/olive-ffmpeg-9.patch b/olive-ffmpeg-9.patch
new file mode 100644
index 0000000..2040a7c
--- /dev/null
+++ b/olive-ffmpeg-9.patch
@@ -0,0 +1,58 @@
+diff -up olive-8ac191ceb64476b50cd8e16dce7c971fb791af95/app/codec/ffmpeg/ffmpegencoder.cpp.orig olive-8ac191ceb64476b50cd8e16dce7c971fb791af95/app/codec/ffmpeg/ffmpegencoder.cpp
+--- olive-8ac191ceb64476b50cd8e16dce7c971fb791af95/app/codec/ffmpeg/ffmpegencoder.cpp.orig	2026-08-21 18:02:55.476472990 +0200
++++ olive-8ac191ceb64476b50cd8e16dce7c971fb791af95/app/codec/ffmpeg/ffmpegencoder.cpp	2026-08-21 18:07:47.116833479 +0200
+@@ -55,14 +55,22 @@ QStringList FFmpegEncoder::GetPixelForma
+   const AVCodec* codec_info = GetEncoder(c, SampleFormat::INVALID);
+ 
+   if (codec_info) {
+-    for (int i=0; codec_info->pix_fmts[i]!=-1; i++) {
+-      if (FFmpegUtils::ConvertJPEGSpaceToRegularSpace(codec_info->pix_fmts[i]) != codec_info->pix_fmts[i]) {
+-        // This is a deprecated "JPEG" space, skip it
+-        continue;
+-      }
++    const AVPixelFormat *supported_pix_fmts = nullptr;
++    if (avcodec_get_supported_config(nullptr, codec_info, AV_CODEC_CONFIG_PIX_FORMAT, 0,
++                                     reinterpret_cast<const void **>(&supported_pix_fmts), nullptr) < 0) {
++      supported_pix_fmts = nullptr;
++    }
++
++    if (supported_pix_fmts) {
++      for (int i=0; supported_pix_fmts[i]!=AV_PIX_FMT_NONE; i++) {
++        if (FFmpegUtils::ConvertJPEGSpaceToRegularSpace(supported_pix_fmts[i]) != supported_pix_fmts[i]) {
++          // This is a deprecated "JPEG" space, skip it
++          continue;
++        }
+ 
+-      const char* pix_fmt_name = av_get_pix_fmt_name(codec_info->pix_fmts[i]);
+-      pix_fmts.append(pix_fmt_name);
++        const char* pix_fmt_name = av_get_pix_fmt_name(supported_pix_fmts[i]);
++        pix_fmts.append(pix_fmt_name);
++      }
+     }
+   }
+ 
+@@ -88,11 +96,19 @@ std::vector<SampleFormat> FFmpegEncoder:
+   } else {
+     const AVCodec* codec_info = GetEncoder(c, SampleFormat::INVALID);
+ 
+-    if (codec_info && codec_info->sample_fmts) {
+-      for (int i=0; codec_info->sample_fmts[i]!=-1; i++) {
+-        SampleFormat this_format = FFmpegUtils::GetNativeSampleFormat(static_cast<AVSampleFormat>(codec_info->sample_fmts[i]));
+-        if (this_format != SampleFormat::INVALID) {
+-          f.push_back(this_format);
++    if (codec_info) {
++      const AVSampleFormat *sample_fmts = nullptr;
++      if (avcodec_get_supported_config(nullptr, codec_info, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0,
++                                       reinterpret_cast<const void **>(&sample_fmts), nullptr) < 0) {
++        sample_fmts = nullptr;
++      }
++
++      if (sample_fmts) {
++        for (int i=0; sample_fmts[i]!=AV_SAMPLE_FMT_NONE; i++) {
++          SampleFormat this_format = FFmpegUtils::GetNativeSampleFormat(static_cast<AVSampleFormat>(sample_fmts[i]));
++          if (this_format != SampleFormat::INVALID) {
++            f.push_back(this_format);
++          }
+         }
+       }
+     }

diff --git a/olive.spec b/olive.spec
index b417b07..cceabc3 100644
--- a/olive.spec
+++ b/olive.spec
@@ -18,7 +18,7 @@ Version:        0.2.0^%{gitdate}git%{shortcommit}
 %else
 Version:        0.2.0
 %endif
-Release:        8%{?dist}
+Release:        9%{?dist}
 Summary:        A free non-linear video editor
 # app/widget/flowlayout/flowlayout.*: BSD-3-Clause
 # ext/KDDockWidgets/LICENSE.txt: GPL-2.0-only OR GPL-3.0-only
@@ -42,6 +42,8 @@ Patch3:         %{name}-oiio-3.0.patch
 Patch4:         %{name}-ffmpeg-8.patch
 Patch5:         0001-fix-qt6-arg-format.patch
 Patch6:         0002-fix-qt6-arg-sampleformat.patch
+# fix build with FFmpeg 9
+Patch7:         %{name}-ffmpeg-9.patch
 %else
 Source0:        https://github.com/olive-editor/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
 %endif
@@ -149,6 +151,9 @@ appstream-util validate-relax --nonet %{buildroot}/%{_metainfodir}/%{unique_name
 %{_datadir}/mime/packages/%{unique_name}.xml
 
 %changelog
+* Fri Aug 21 2026 Dominik Mierzejewski <dominik@greysector.net> - 0.2.0^20241204git8ac191c-9
+- fix build with FFmpeg 9
+
 * Thu Jul 16 2026 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0^20241204git8ac191c-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild
 

                 reply	other threads:[~2026-08-22 14:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178740797602.1.401336258656269916.rpms-olive-2f6720ef0a6d@fedoraproject.org \
    --to=dominik@greysector.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox