From b3056163b9da4425aab25e3c9630a805a48d30ff Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Nov 2025 01:10:39 +0100 Subject: Missing check for duplicate IDs. Without this call we don't spot duplicates that are found in the initial scan. --- run/tests | 2 +- src/lib/ffmpeg_examiner.cc | 2 ++ test/ffmpeg_examiner_test.cc | 8 ++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/run/tests b/run/tests index c17330dca..b5f45d5e7 100755 --- a/run/tests +++ b/run/tests @@ -3,7 +3,7 @@ # e.g. --run_tests=foo set -e -PRIVATE_GIT="9c6e881036e5ce29d0e64d8c3159714706ce49f9" +PRIVATE_GIT="81e32cb5962320333839b7020d14d9f291b8ff2d" DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" source $DIR/environment diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index c50f13ba5..d2e1c9d40 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -99,6 +99,8 @@ FFmpegExaminer::FFmpegExaminer(shared_ptr c, shared_ptrsub(_("Finding length")); } + check_for_duplicate_ids(); + /* Run through until we find: * - the first video. * - the first audio for each stream. diff --git a/test/ffmpeg_examiner_test.cc b/test/ffmpeg_examiner_test.cc index c07900db8..8758c3b78 100644 --- a/test/ffmpeg_examiner_test.cc +++ b/test/ffmpeg_examiner_test.cc @@ -93,3 +93,11 @@ BOOST_AUTO_TEST_CASE (ffmpeg_examiner_video_stream_selection_test) BOOST_REQUIRE (examiner->video_frame_rate()); BOOST_CHECK_EQUAL (examiner->video_frame_rate().get(), 25); } + + +BOOST_AUTO_TEST_CASE(test_crash_during_examination_with_duplicate_ids) +{ + auto content = make_shared(TestPaths::private_data() / "hunter.mkv"); + auto examiner = make_shared(content); +} + -- cgit v1.2.3