From a600c8e557583dd730960297aa436169654fc607 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 3 Aug 2020 09:51:27 +0200 Subject: [PATCH] Fix number of frames in the pulldown check. Backported-from-commit: 5f1fdbafc6eef37523250e0b8542a8939a038823 Backported-from-branch: v2.15.x --- src/lib/ffmpeg_examiner.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index d439b0eb6..3b907ea54 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -151,7 +151,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr c, shared_ptr= PULLDOWN_CHECK_FRAMES) { + if (_first_video && got_all_audio && temporal_reference.size() >= (PULLDOWN_CHECK_FRAMES * 2)) { /* All done */ break; } @@ -206,7 +206,7 @@ FFmpegExaminer::video_packet (AVCodecContext* context, string& temporal_referenc { DCPOMATIC_ASSERT (_video_stream); - if (_first_video && !_need_video_length && temporal_reference.size() >= PULLDOWN_CHECK_FRAMES) { + if (_first_video && !_need_video_length && temporal_reference.size() >= (PULLDOWN_CHECK_FRAMES * 2)) { return; } @@ -220,7 +220,7 @@ FFmpegExaminer::video_packet (AVCodecContext* context, string& temporal_referenc _format_context->streams[_video_stream.get()] ).get_value_or (ContentTime ()).frames_round (video_frame_rate().get ()); } - if (temporal_reference.size() < PULLDOWN_CHECK_FRAMES) { + if (temporal_reference.size() < (PULLDOWN_CHECK_FRAMES * 2)) { temporal_reference += (_frame->top_field_first ? "T" : "B"); temporal_reference += (_frame->repeat_pict ? "3" : "2"); } -- 2.30.2