Control: tags -1 patch

I am uploading a NMU to fix this.
Please find the changes attached.
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 <[email protected]>  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 <[email protected]>
+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

Reply via email to