summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-08-03 09:51:27 +0200
committerCarl Hetherington <cth@carlh.net>2020-08-03 08:00:49 +0000
commita600c8e557583dd730960297aa436169654fc607 (patch)
treedd4dc13e92645f25ce87857e0cbad54f12d044b8
parent75820f6fe6d1d2de7546694c6c875c24b40478bf (diff)
Fix number of frames in the pulldown check.
Backported-from-commit: 5f1fdbafc6eef37523250e0b8542a8939a038823 Backported-from-branch: v2.15.x
-rw-r--r--src/lib/ffmpeg_examiner.cc6
1 files 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<const FFmpegContent> c, shared_ptr<Jo
av_packet_unref (&_packet);
- if (_first_video && got_all_audio && temporal_reference.size() >= 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");
}