Control: tags 1144236 + patch Control: tags 1144236 + pending Dear maintainer,
I've prepared an NMU for zoneminder (versioned as 1.36.37+dfsg1-1.1) and uploaded it to DELAYED/2. Please feel free to tell me if I should cancel it. cu Adrian
diffstat for zoneminder-1.36.37+dfsg1 zoneminder-1.36.37+dfsg1 changelog | 7 + patches/0001-Handle-deprecations-in-7.1.patch | 86 +++++++++++++++++++ patches/0002-Deal-with-ffmpeg-7.1-deprecations.patch | 45 +++++++++ patches/series | 2 4 files changed, 140 insertions(+) diff -Nru zoneminder-1.36.37+dfsg1/debian/changelog zoneminder-1.36.37+dfsg1/debian/changelog --- zoneminder-1.36.37+dfsg1/debian/changelog 2026-02-01 05:02:14.000000000 +0200 +++ zoneminder-1.36.37+dfsg1/debian/changelog 2026-10-03 20:19:19.000000000 +0300 @@ -1,3 +1,10 @@ +zoneminder (1.36.37+dfsg1-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Backport upstream fixes for FTBFS with FFmpeg 9. (Closes: #1144236) + + -- Adrian Bunk <[email protected]> Sat, 03 Oct 2026 20:19:19 +0300 + zoneminder (1.36.37+dfsg1-1) unstable; urgency=medium * New upstream release. diff -Nru zoneminder-1.36.37+dfsg1/debian/patches/0001-Handle-deprecations-in-7.1.patch zoneminder-1.36.37+dfsg1/debian/patches/0001-Handle-deprecations-in-7.1.patch --- zoneminder-1.36.37+dfsg1/debian/patches/0001-Handle-deprecations-in-7.1.patch 1970-01-01 02:00:00.000000000 +0200 +++ zoneminder-1.36.37+dfsg1/debian/patches/0001-Handle-deprecations-in-7.1.patch 2026-10-03 20:19:19.000000000 +0300 @@ -0,0 +1,86 @@ +From 8fb3ad246ea46409e62f2579107707abc921f947 Mon Sep 17 00:00:00 2001 +From: Isaac Connor <[email protected]> +Date: Sat, 15 Feb 2025 16:59:52 -0500 +Subject: Handle deprecations in 7.1 + +--- + src/zm_videostore.cpp | 56 +++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 56 insertions(+) + +diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp +index ecb88dfa7..9ed507087 100644 +--- a/src/zm_videostore.cpp ++++ b/src/zm_videostore.cpp +@@ -894,6 +894,61 @@ bool VideoStore::setup_resampler() { + #endif + #endif + ++#if LIBAVCODEC_VERSION_CHECK(61, 19,100, 19, 100) ++ const enum AVSampleFormat *sample_fmts; ++ const int *supported_samplerates; ++ int num_sample_fmts, num_samplerates; ++ ret = avcodec_get_supported_config(audio_out_ctx, NULL, AV_CODEC_CONFIG_SAMPLE_FORMAT, ++ 0, (const void **) &sample_fmts, ++ &num_sample_fmts); ++ if (ret < 0) ++ return ret; ++ if (sample_fmts) { ++ int i; ++ for (i = 0; i < num_sample_fmts; i++) { ++ if (audio_out_ctx->sample_fmt == sample_fmts[i]) ++ break; ++ if (audio_out_ctx->ch_layout.nb_channels == 1 && ++ av_get_planar_sample_fmt(audio_out_ctx->sample_fmt) == ++ av_get_planar_sample_fmt(sample_fmts[i])) { ++ audio_out_ctx->sample_fmt = sample_fmts[i]; ++ break; ++ } ++ } ++ if (i == num_sample_fmts) { ++ Error("Specified sample format %s is not supported by the %s encoder", ++ av_get_sample_fmt_name(audio_out_ctx->sample_fmt), audio_out_codec->name); ++ ++ Error("Supported sample formats:"); ++ for (int p = 0; sample_fmts[p] != AV_SAMPLE_FMT_NONE; p++) { ++ Error(" %s", av_get_sample_fmt_name(sample_fmts[p])); ++ } ++ ++ return AVERROR(EINVAL); ++ } ++ } // end if sample_fmts ++ ++ ret = avcodec_get_supported_config(audio_out_ctx, NULL, AV_CODEC_CONFIG_SAMPLE_RATE, ++ 0, (const void **) &supported_samplerates, ++ &num_samplerates); ++ if (ret < 0) ++ return ret; ++ if (supported_samplerates) { ++ int i; ++ for (i = 0; i < num_samplerates; i++) ++ if (audio_out_ctx->sample_rate == supported_samplerates[i]) ++ break; ++ if (i == num_samplerates) { ++ Error("Specified sample rate %d is not supported by the %s encoder", audio_out_ctx->sample_rate, audio_out_codec->name); ++ ++ Error("Supported sample rates:"); ++ for (int p = 0; supported_samplerates[p]; p++) ++ Error(" %d\n", supported_samplerates[p]); ++ ++ return AVERROR(EINVAL); ++ } ++ } ++#else + if (audio_out_codec->supported_samplerates) { + int found = 0; + for (unsigned int i = 0; audio_out_codec->supported_samplerates[i]; i++) { +@@ -918,6 +973,7 @@ bool VideoStore::setup_resampler() { + av_get_sample_fmt_name(audio_out_ctx->sample_fmt)); + audio_out_ctx->sample_fmt = AV_SAMPLE_FMT_FLTP; + } ++#endif + + // Example code doesn't set the codec tb. I think it just uses whatever defaults + //audio_out_ctx->time_base = (AVRational){1, audio_out_ctx->sample_rate}; +-- +2.47.3 + diff -Nru zoneminder-1.36.37+dfsg1/debian/patches/0002-Deal-with-ffmpeg-7.1-deprecations.patch zoneminder-1.36.37+dfsg1/debian/patches/0002-Deal-with-ffmpeg-7.1-deprecations.patch --- zoneminder-1.36.37+dfsg1/debian/patches/0002-Deal-with-ffmpeg-7.1-deprecations.patch 1970-01-01 02:00:00.000000000 +0200 +++ zoneminder-1.36.37+dfsg1/debian/patches/0002-Deal-with-ffmpeg-7.1-deprecations.patch 2026-10-03 20:19:19.000000000 +0300 @@ -0,0 +1,45 @@ +From 05ec0914156794af6d6ecf7b32a9b6f8130de7e3 Mon Sep 17 00:00:00 2001 +From: Isaac Connor <[email protected]> +Date: Fri, 8 Aug 2025 08:13:59 -0700 +Subject: Deal with ffmpeg 7.1 deprecations + +--- + src/zm_ffmpeg.cpp | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp +index 10387a7a6..52b12a799 100644 +--- a/src/zm_ffmpeg.cpp ++++ b/src/zm_ffmpeg.cpp +@@ -373,6 +373,20 @@ void zm_dump_stream_format(AVFormatContext *ic, int i, int index, int is_output) + } + + int check_sample_fmt(const AVCodec *codec, enum AVSampleFormat sample_fmt) { ++#if LIBAVCODEC_VERSION_CHECK(61, 19,100, 19, 100) ++ const enum AVSampleFormat *sample_fmts; ++ int num_sample_fmts; ++ int ret = avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_SAMPLE_FORMAT, 0, (const void **) &sample_fmts, &num_sample_fmts); ++ if (ret < 0) ++ return ret; ++ if (sample_fmts) { ++ for (int i = 0; i < num_sample_fmts; i++) { ++ if (sample_fmt == sample_fmts[i]) ++ return 1; ++ } ++ } // end if sample_fmts ++ ++#else + const enum AVSampleFormat *p = codec->sample_fmts; + + while (*p != AV_SAMPLE_FMT_NONE) { +@@ -381,6 +395,7 @@ int check_sample_fmt(const AVCodec *codec, enum AVSampleFormat sample_fmt) { + else Debug(2, "Not %s", av_get_sample_fmt_name( *p ) ); + p++; + } ++#endif + return 0; + } + +-- +2.47.3 + diff -Nru zoneminder-1.36.37+dfsg1/debian/patches/series zoneminder-1.36.37+dfsg1/debian/patches/series --- zoneminder-1.36.37+dfsg1/debian/patches/series 2026-02-01 05:02:14.000000000 +0200 +++ zoneminder-1.36.37+dfsg1/debian/patches/series 2026-10-03 20:19:19.000000000 +0300 @@ -4,3 +4,5 @@ 0008-Unlink-installation-docs.patch 0009-Allow-generation-of-random-seeds-on-install-time-not.patch #time64.patch +0001-Handle-deprecations-in-7.1.patch +0002-Deal-with-ffmpeg-7.1-deprecations.patch

