Article View: linux.debian.bugs.rc
Article #806Bug#1144330: libopenshot: diff for NMU version 0.5.0+dfsg1-2.1
From: Adrian Bunk
Date: Sat, 17 Oct 2026 18:30
Date: Sat, 17 Oct 2026 18:30
190 lines
9000 bytes
9000 bytes
--D1SV60lcIx+o3T4i
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Control: tags 1144330 + patch
Control: tags 1144330 + pending
Dear maintainer,
I've prepared an NMU for libopenshot (versioned as 0.5.0+dfsg1-2.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I should cancel it.
cu
Adrian
--D1SV60lcIx+o3T4i
Content-Type: text/x-diff; charset=utf-8
Content-Disposition: attachment;
filename="libopenshot-0.5.0+dfsg1-2.1-nmu.diff"
diffstat for libopenshot-0.5.0+dfsg1 libopenshot-0.5.0+dfsg1
changelog | 7 ++
patches/ffmpeg9.patch | 134 ++++++++++++++++++++++++++++++++++++++++++++++++++
patches/series | 1
3 files changed, 142 insertions(+)
diff -Nru libopenshot-0.5.0+dfsg1/debian/changelog libopenshot-0.5.0+dfsg1/debian/changelog
--- libopenshot-0.5.0+dfsg1/debian/changelog 2026-03-05 01:13:40.000000000 +0200
+++ libopenshot-0.5.0+dfsg1/debian/changelog 2026-10-16 21:38:30.000000000 +0300
@@ -1,3 +1,10 @@
+libopenshot (0.5.0+dfsg1-2.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Add fix for FTBFS with FFmpeg 9. (Closes: #1144330)
+
+ -- Adrian Bunk <bunk@debian.org> Fri, 16 Oct 2026 21:38:30 +0300
+
libopenshot (0.5.0+dfsg1-2) unstable; urgency=medium
* Team upload
diff -Nru libopenshot-0.5.0+dfsg1/debian/patches/ffmpeg9.patch libopenshot-0.5.0+dfsg1/debian/patches/ffmpeg9.patch
--- libopenshot-0.5.0+dfsg1/debian/patches/ffmpeg9.patch 1970-01-01 02:00:00.000000000 +0200
+++ libopenshot-0.5.0+dfsg1/debian/patches/ffmpeg9.patch 2026-10-16 21:38:30.000000000 +0300
@@ -0,0 +1,134 @@
+--- libopenshot-0.7.0/src/FFmpegWriter.cpp 2026-04-03 01:34:37.000000000 +0200
++++ libopenshot-0.7.0/src/FFmpegWriter.cpp 2026-08-13 19:59:55.020084338 +0200
+@@ -1042,38 +1042,60 @@
+ #endif
+
+ // Set valid sample rate (or throw error)
+- if (codec->supported_samplerates) {
+- int i;
+- for (i = 0; codec->supported_samplerates[i] != 0; i++)
+- if (info.sample_rate == codec->supported_samplerates[i]) {
+- // Set the valid sample rate
+- c->sample_rate = info.sample_rate;
+- break;
+- }
+- if (codec->supported_samplerates[i] == 0)
+- throw InvalidSampleRate("An invalid sample rate was detected for this codec.", path);
+- } else
+- // Set sample rate
+- c->sample_rate = info.sample_rate;
++ // AVCodec.supported_samplerates removed in FFmpeg 9+
++ {
++ const int *supported_samplerates = NULL;
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100)
++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_RATE, 0,
++ (const void **)&supported_samplerates, NULL) < 0)
++ supported_samplerates = NULL;
++#else
++ supported_samplerates = codec->supported_samplerates;
++#endif
++ if (supported_samplerates) {
++ int i;
++ for (i = 0; supported_samplerates[i] != 0; i++)
++ if (info.sample_rate == supported_samplerates[i]) {
++ // Set the valid sample rate
++ c->sample_rate = info.sample_rate;
++ break;
++ }
++ if (supported_samplerates[i] == 0)
++ throw InvalidSampleRate("An invalid sample rate was detected for this codec.", path);
++ } else
++ // Set sample rate
++ c->sample_rate = info.sample_rate;
++ }
+
+ uint64_t channel_layout = info.channel_layout;
+ #if HAVE_CH_LAYOUT
+ // Set a valid number of channels (or throw error)
++ // AVCodec.ch_layouts removed in FFmpeg 9+
+ AVChannelLayout ch_layout;
+ av_channel_layout_from_mask(&ch_layout, info.channel_layout);
+- if (codec->ch_layouts) {
+- int i;
+- for (i = 0; av_channel_layout_check(&codec->ch_layouts[i]); i++)
+- if (av_channel_layout_compare(&ch_layout, &codec->ch_layouts[i])) {
+- // Set valid channel layout
+- av_channel_layout_copy(&c->ch_layout, &ch_layout);
+- break;
+- }
+- if (!av_channel_layout_check(&codec->ch_layouts[i]))
+- throw InvalidChannels("An invalid channel layout was detected (i.e. MONO / STEREO).", path);
+- } else
+- // Set valid channel layout
+- av_channel_layout_copy(&c->ch_layout, &ch_layout);
++ {
++ const AVChannelLayout *ch_layouts = NULL;
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100)
++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_CHANNEL_LAYOUT, 0,
++ (const void **)&ch_layouts, NULL) < 0)
++ ch_layouts = NULL;
++#else
++ ch_layouts = codec->ch_layouts;
++#endif
++ if (ch_layouts) {
++ int i;
++ for (i = 0; av_channel_layout_check(&ch_layouts[i]); i++)
++ if (av_channel_layout_compare(&ch_layout, &ch_layouts[i])) {
++ // Set valid channel layout
++ av_channel_layout_copy(&c->ch_layout, &ch_layout);
++ break;
++ }
++ if (!av_channel_layout_check(&ch_layouts[i]))
++ throw InvalidChannels("An invalid channel layout was detected (i.e. MONO / STEREO).", path);
++ } else
++ // Set valid channel layout
++ av_channel_layout_copy(&c->ch_layout, &ch_layout);
++ }
+ #else
+ // Set a valid number of channels (or throw error)
+ if (codec->channel_layouts) {
+@@ -1092,11 +1114,22 @@
+ #endif
+
+ // Choose a valid sample_fmt
+- if (codec->sample_fmts) {
+- for (int i = 0; codec->sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) {
+- // Set sample format to 1st valid format (and then exit loop)
+- c->sample_fmt = codec->sample_fmts[i];
+- break;
++ // AVCodec.sample_fmts removed in FFmpeg 9+
++ {
++ const enum AVSampleFormat *sample_fmts = NULL;
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100)
++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0,
++ (const void **)&sample_fmts, NULL) < 0)
++ sample_fmts = NULL;
++#else
++ sample_fmts = codec->sample_fmts;
++#endif
++ if (sample_fmts) {
++ for (int i = 0; sample_fmts[i] != AV_SAMPLE_FMT_NONE; i++) {
++ // Set sample format to 1st valid format (and then exit loop)
++ c->sample_fmt = sample_fmts[i];
++ break;
++ }
+ }
+ }
+ if (c->sample_fmt == AV_SAMPLE_FMT_NONE) {
+@@ -1297,7 +1330,15 @@
+ #endif
+
+ // Find all supported pixel formats for this codec
+- const PixelFormat *supported_pixel_formats = codec->pix_fmts;
++ // AVCodec.pix_fmts removed in FFmpeg 9+
++ const PixelFormat *supported_pixel_formats = NULL;
++#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(61, 13, 100)
++ if (avcodec_get_supported_config(NULL, codec, AV_CODEC_CONFIG_PIX_FORMAT, 0,
++ (const void **)&supported_pixel_formats, NULL) < 0)
++ supported_pixel_formats = NULL;
++#else
++ supported_pixel_formats = codec->pix_fmts;
++#endif
+ while (supported_pixel_formats != NULL && *supported_pixel_formats != PIX_FMT_NONE) {
+ // Assign the 1st valid pixel format (if one is missing)
+ if (c->pix_fmt == PIX_FMT_NONE)
diff -Nru libopenshot-0.5.0+dfsg1/debian/patches/series libopenshot-0.5.0+dfsg1/debian/patches/series
--- libopenshot-0.5.0+dfsg1/debian/patches/series 2026-03-05 01:12:12.000000000 +0200
+++ libopenshot-0.5.0+dfsg1/debian/patches/series 2026-10-16 21:38:30.000000000 +0300
@@ -1,3 +1,4 @@
0001-Include-SOVERSION-in-VERSION.patch
fix_examples.patch
0002-fix-ffmpeg8.patch
+ffmpeg9.patch
--D1SV60lcIx+o3T4i--
Technical Details
Message-ID:
<NPhkl-6boC-3@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.szaf.org!news.datentrampelpfad.de!news.imp.ch!news.corradoroberto.it!bofh.it!news.nic.it!robomodReferences:
<NrJKN-aKj2-1@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.szaf.org!news.datentrampelpfad.de!news.imp.ch!news.corradoroberto.it!bofh.it!news.nic.it!robomod From: Adrian Bunk <bunk@debian.org> Newsgroups: linux.debian.bugs.rc Subject: Bug#1144330: libopenshot: diff for NMU version 0.5.0+dfsg1-2.1 Date: Sat, 17 Oct 2026 20:30:01 +0200 Message-ID: <NPhkl-6boC-3@gated-at.bofh.it> References: <NrJKN-aKj2-1@gated-at.bofh.it> X-Original-To: 1144330@bugs.debian.org X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org Sat Oct 17 18:29:09 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Adrian Bunk <bunk@debian.org>, 1144330@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: debian-multimedia@lists.debian.org X-Debian-Pr-Message: followup 1144330 X-Debian-Pr-Package: src:libopenshot X-Debian-Pr-Keywords: forky ftbfs sid X-Debian-Pr-Source: libopenshot MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="D1SV60lcIx+o3T4i" Content-Disposition: inline X-Debian-User: bunk X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/834811 List-ID: <debian-bugs-rc.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-rc/> Approved: robomod@news.nic.it Lines: 190 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Sat, 17 Oct 2026 21:26:01 +0300 X-Original-Message-ID: <atO9uaC4RL6ZcR4y@localhost> X-Original-References: <an4hnL-UL56ymPPW@ramacher.at>