From 2d8d05c2e7ad67ebac2ff250670a219a891d09ca Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Oct 2025 17:02:15 +0200 Subject: Disable use of stream IDs if there are duplicates, rather than rewriting. It turns out that FFmpeg decoders (e.g. flv, see FFmpeg 25faaa311a74efdfdc4fed56996d7338ed807488) check stream IDs and sometimes create new streams if they see one that they didn't see before. If we change stream IDs we break this. Here we try to use stream indices in cases where the IDs are duplicated. We also account for the case where a new stream appears during examination. This wasn't covered by tests until the FFmpeg commit mentioned above, were the flv decoder creates a new stream during examination of boon_telly.mkv. --- test/frame_rate_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test') diff --git a/test/frame_rate_test.cc b/test/frame_rate_test.cc index f38b65450..8d085478f 100644 --- a/test/frame_rate_test.cc +++ b/test/frame_rate_test.cc @@ -249,7 +249,7 @@ BOOST_AUTO_TEST_CASE (audio_sampling_rate_test) std::list afr = { 24, 25, 30 }; Config::instance()->set_allowed_dcp_frame_rates (afr); - auto stream = std::make_shared("foo", 0, 0, 0, 0, 0); + auto stream = std::make_shared("foo", 0, 0, 0, 0, 0, 0); content->audio = std::make_shared(content.get()); content->audio->add_stream (stream); content->_video_frame_rate = 24; -- cgit v1.2.3