summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-04-07 23:44:26 +0200
committerCarl Hetherington <cth@carlh.net>2024-04-22 13:03:04 +0200
commit0af59e8225eae1154e4844711012646681769b00 (patch)
tree291311a5d29903e19bd1505f9c08f735f466f36b /src/lib
parent03a6be002b24e6cbb998d31a5cf4703de6196aa2 (diff)
Report video range from MPEG2 DCPs correctly.
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/dcp_examiner.cc4
-rw-r--r--src/lib/dcp_examiner.h3
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/dcp_examiner.cc b/src/lib/dcp_examiner.cc
index 92491947c..229786868 100644
--- a/src/lib/dcp_examiner.cc
+++ b/src/lib/dcp_examiner.cc
@@ -164,6 +164,10 @@ DCPExaminer::DCPExaminer (shared_ptr<const DCPContent> content, bool tolerant)
} else if (_video_size.get() != asset->size ()) {
throw DCPError (_("Mismatched video sizes in DCP"));
}
+
+ if (dynamic_pointer_cast<dcp::MPEG2PictureAsset>(asset)) {
+ _video_range = VideoRange::VIDEO;
+ }
}
}
diff --git a/src/lib/dcp_examiner.h b/src/lib/dcp_examiner.h
index 425552632..d6baf7d50 100644
--- a/src/lib/dcp_examiner.h
+++ b/src/lib/dcp_examiner.h
@@ -61,7 +61,7 @@ public:
}
VideoRange range () const override {
- return VideoRange::FULL;
+ return _video_range;
}
PixelQuanta pixel_quanta () const override {
@@ -211,6 +211,7 @@ private:
Frame _atmos_length = 0;
dcp::Fraction _atmos_edit_rate;
EnumIndexedVector<bool, TextType> _has_non_zero_entry_point;
+ VideoRange _video_range = VideoRange::FULL;
struct Font
{