diff -Nru torchcodec-0.14.0/debian/changelog torchcodec-0.14.0/debian/changelog --- torchcodec-0.14.0/debian/changelog 2026-10-03 12:22:50.000000000 -0500 +++ torchcodec-0.14.0/debian/changelog 2026-10-25 15:07:45.000000000 -0500 @@ -1,3 +1,12 @@ +torchcodec (0.14.0-1.2) UNRELEASED; urgency=medium + + * d/p/ffmpeg9-flac-cli-block-size.patch: backport upstream test fix, the + FFmpeg 9 CLI encodes FLAC with different block sizes so only the decoded + samples can be compared with torchcodec's output, not the packets. Fixes + the autopkgtest regression with ffmpeg 9. + + -- Sebastien Bacher Sun, 25 Oct 2026 15:07:45 -0500 + torchcodec (0.14.0-1.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru torchcodec-0.14.0/debian/patches/ffmpeg9-flac-cli-block-size.patch torchcodec-0.14.0/debian/patches/ffmpeg9-flac-cli-block-size.patch --- torchcodec-0.14.0/debian/patches/ffmpeg9-flac-cli-block-size.patch 1969-12-31 18:00:00.000000000 -0600 +++ torchcodec-0.14.0/debian/patches/ffmpeg9-flac-cli-block-size.patch 2026-10-25 15:07:45.000000000 -0500 @@ -0,0 +1,50 @@ +Description: Don't compare FLAC packets with the FFmpeg >= 9 CLI output + On FFmpeg >= 9 the ffmpeg CLI encodes FLAC with a block size equal to the + number of samples of the first frame fed to the encoder, instead of the + default block size for the sample rate used by torchcodec. The decoded + samples still match, only the packet layout differs, so skip + validate_frames_properties() in that case. Backported to both + TestAudioEncoder::test_against_cli and TestEncoder::test_audio_against_cli, + which were merged upstream later. +Author: Nicolas Hug +Reviewed-By: Sebastien Bacher +Origin: backport, https://github.com/pytorch/torchcodec/commit/4cf853d18eae6d0a035986bc91dfe46b2a4ad3bc +Applied-Upstream: 0.16.0, https://github.com/pytorch/torchcodec/pull/1618 +Last-Update: 2026-10-25 +--- +Index: torchcodec-0.14.0/test/test_encoders.py +=================================================================== +--- torchcodec-0.14.0.orig/test/test_encoders.py ++++ torchcodec-0.14.0/test/test_encoders.py +@@ -379,7 +379,14 @@ class TestAudioEncoder: + assert samples_by_us.duration_seconds == samples_by_ffmpeg.duration_seconds + assert samples_by_us.sample_rate == samples_by_ffmpeg.sample_rate + +- if method == "to_file": ++ # On FFmpeg >= 9 the CLI encodes FLAC with a block size equal to the ++ # number of samples of the first frame it feeds to the encoder (e.g. 47 ++ # for NASA_AUDIO_MP3, whose first decoded frame is short because of the ++ # mp3 encoder delay), instead of the block size that the FLAC encoder ++ # picks by default from the sample rate, which is what we use. The ++ # decoded samples still match, but the packets can't. ++ cli_flac_block_size_differs = format == "flac" and ffmpeg_major_version >= 9 ++ if method == "to_file" and not cli_flac_block_size_differs: + validate_frames_properties(actual=encoded_by_us, expected=encoded_by_ffmpeg) + + @pytest.mark.parametrize("asset", (NASA_AUDIO_MP3, SINE_MONO_S32)) +@@ -2537,7 +2544,14 @@ class TestEncoder: + ) + assert samples_by_us.sample_rate == samples_by_ffmpeg.sample_rate + +- if method == "to_file": ++ # On FFmpeg >= 9 the CLI encodes FLAC with a block size equal to the ++ # number of samples of the first frame it feeds to the encoder (e.g. 47 ++ # for NASA_AUDIO_MP3, whose first decoded frame is short because of the ++ # mp3 encoder delay), instead of the block size that the FLAC encoder ++ # picks by default from the sample rate, which is what we use. The ++ # decoded samples still match, but the packets can't. ++ cli_flac_block_size_differs = format == "flac" and ffmpeg_major_version >= 9 ++ if method == "to_file" and not cli_flac_block_size_differs: + validate_frames_properties( + actual=encoder_output, expected=encoded_by_ffmpeg + ) diff -Nru torchcodec-0.14.0/debian/patches/series torchcodec-0.14.0/debian/patches/series --- torchcodec-0.14.0/debian/patches/series 2026-10-03 12:22:49.000000000 -0500 +++ torchcodec-0.14.0/debian/patches/series 2026-10-25 10:39:59.000000000 -0500 @@ -1,2 +1,3 @@ setup-fix.patch 0001-Build-against-FFmpeg-9-1607.patch +ffmpeg9-flac-cli-block-size.patch