Article View: linux.debian.bugs.rc
Article #4256Bug#1115036: octave-video: FTBFS with ffmpeg 9
From: Bastian Germann
Date: Thu, 26 Nov 2026 08:40
Date: Thu, 26 Nov 2026 08:40
114 lines
6290 bytes
6290 bytes
--O68XBtU4tHOqgweW
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Control: tags -1 patch
I am uploading a NMU to fix this.
Please find the changes attached.
--O68XBtU4tHOqgweW
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: attachment; filename=octave-video_2.1.3-3.1.debdiff
Content-Transfer-Encoding: 8bit
diff -Nru octave-video-2.1.3/debian/changelog octave-video-2.1.3/debian/changelog
--- octave-video-2.1.3/debian/changelog 2026-09-06 08:13:29.000000000 +0200
+++ octave-video-2.1.3/debian/changelog 2026-11-26 08:52:02.000000000 +0100
@@ -1,3 +1,10 @@
+octave-video (2.1.3-3.1) unstable; urgency=medium
+
+ * Non-maintainer upload
+ * Apply upstream patch to build with ffmpeg 8.0 (Closes: #1115036)
+
+ -- Bastian Germann <bage@debian.org> Thu, 26 Nov 2026 08:52:02 +0100
+
octave-video (2.1.3-3) unstable; urgency=medium
[ Rafael Laboissière ]
diff -Nru octave-video-2.1.3/debian/patches/cap_ffmpeg_impl_ov.patch octave-video-2.1.3/debian/patches/cap_ffmpeg_impl_ov.patch
--- octave-video-2.1.3/debian/patches/cap_ffmpeg_impl_ov.patch 1970-01-01 01:00:00.000000000 +0100
+++ octave-video-2.1.3/debian/patches/cap_ffmpeg_impl_ov.patch 2026-11-26 08:52:02.000000000 +0100
@@ -0,0 +1,24 @@
+Origin: https://github.com/Andy1978/octave-video/issues/6
+---
+--- a/src/cap_ffmpeg_impl_ov.hpp
++++ b/src/cap_ffmpeg_impl_ov.hpp
+@@ -1834,12 +1834,16 @@ static AVCodecContext * icv_configure_video_stream_FFMPEG(AVFormatContext *oc,
+ c->time_base.den = frame_rate;
+ c->time_base.num = frame_rate_base;
+ /* adjust time base for supported framerates */
+- if(codec->supported_framerates){
+- const AVRational *p= codec->supported_framerates;
++
++ const AVRational *p = NULL;
++ int num_framerates = 0;
++ int ret = avcodec_get_supported_config(c, codec, AV_CODEC_CONFIG_FRAME_RATE, 0,
++ (const void **)&p, &num_framerates);
++ if(ret){
+ AVRational req = {frame_rate, frame_rate_base};
+ const AVRational *best=NULL;
+ AVRational best_error= {INT_MAX, 1};
+- for(; p->den!=0; p++){
++ for(int i=0; i < num_framerates; i++){
+ AVRational error= av_sub_q(req, *p);
+ if(error.num <0) error.num *= -1;
+ if(av_cmp_q(error, best_error) < 0){
diff -Nru octave-video-2.1.3/debian/patches/ffmpeg8.patch octave-video-2.1.3/debian/patches/ffmpeg8.patch
--- octave-video-2.1.3/debian/patches/ffmpeg8.patch 1970-01-01 01:00:00.000000000 +0100
+++ octave-video-2.1.3/debian/patches/ffmpeg8.patch 2026-11-26 08:52:02.000000000 +0100
@@ -0,0 +1,46 @@
+Origin: upstream, 7afd94b6c85c28c584dd9d17c80f888bb2672038
+From: Andreas Weber <andy@josoansi.de>
+Date: Fri, 15 May 2026 22:29:46 +0200
+Subject: Prepare fix for Issue #5, build with ffmpeg 8.0
+ https://github.com/Andy1978/octave-video/issues/5
+
+---
+diff --git a/src/cap_ffmpeg_impl_ov.hpp b/src/cap_ffmpeg_impl_ov.hpp
+index d7941d3..d30d1dc 100644
+--- a/src/cap_ffmpeg_impl_ov.hpp
++++ b/src/cap_ffmpeg_impl_ov.hpp
+@@ -652,7 +652,12 @@ void CvCapture_FFMPEG::close()
+
+ if( video_st )
+ {
+- avcodec_close( context );
++ // avcodec_close removed in FFmpeg release 8.0
++ #if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100))
++ avcodec_close( context );
++ #else
++ avcodec_free_context( &context );
++ #endif
+ video_st = NULL;
+ }
+
+@@ -1506,7 +1511,20 @@ void CvCapture_FFMPEG::get_rotation_angle()
+ {
+ rotation_angle = 0;
+ const uint8_t *data = 0;
++ // av_stream_get_side_data removed in FFmpeg release 8.0
++#if (LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(62, 11, 100))
+ data = av_stream_get_side_data(video_st, AV_PKT_DATA_DISPLAYMATRIX, NULL);
++#else
++ AVPacketSideData* sd = video_st->codecpar->coded_side_data;
++ int nb_sd = video_st->codecpar->nb_coded_side_data;
++ if (sd && nb_sd > 0)
++ {
++ const AVPacketSideData* mtx = av_packet_side_data_get(sd, nb_sd, AV_PKT_DATA_DISPLAYMATRIX);
++ if (mtx)
++ data = mtx->data;
++ data = mtx->data;
++ }
++#endif
+ if (data)
+ {
+ rotation_angle = -round(av_display_rotation_get((const int32_t*)data));
diff -Nru octave-video-2.1.3/debian/patches/series octave-video-2.1.3/debian/patches/series
--- octave-video-2.1.3/debian/patches/series 1970-01-01 01:00:00.000000000 +0100
+++ octave-video-2.1.3/debian/patches/series 2026-11-26 08:52:02.000000000 +0100
@@ -0,0 +1,2 @@
+ffmpeg8.patch
+cap_ffmpeg_impl_ov.patch
--O68XBtU4tHOqgweW--
Technical Details
Message-ID:
<O3Dbj-eeqR-5@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodReferences:
<LuiSO-eQrc-39@gated-at.bofh.it>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-ams.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Bastian Germann <bage@debian.org> Newsgroups: linux.debian.bugs.rc Subject: Bug#1115036: octave-video: FTBFS with ffmpeg 9 Date: Thu, 26 Nov 2026 09:40:01 +0100 Message-ID: <O3Dbj-eeqR-5@gated-at.bofh.it> References: <LuiSO-eQrc-39@gated-at.bofh.it> X-Mailbox-Line: From debian-bugs-rc-request@lists.debian.org Thu Nov 26 08:37:07 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.7 Reply-To: Bastian Germann <bage@debian.org>, 1115036@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: team+octave-team@tracker.debian.org X-Debian-Pr-Message: followup 1115036 X-Debian-Pr-Package: src:octave-video X-Debian-Pr-Keywords: forky ftbfs sid X-Debian-Pr-Source: octave-video MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="O68XBtU4tHOqgweW" Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Debian-User: bage X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-rc@lists.debian.org> archive/latest/839716 List-ID: <debian-bugs-rc.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-rc/> Approved: robomod@news.nic.it Lines: 114 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 26 Nov 2026 09:35:12 +0100 X-Original-Message-ID: <awfvQDr174YtRFZp@duagon-BXN3S64.localdomain> X-Original-References: <20250912203943.C861710122627@jupiter.ramacher.at>