summaryrefslogtreecommitdiff
path: root/src/lib/video_mxf_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2022-09-29 10:17:50 +0200
committerCarl Hetherington <cth@carlh.net>2024-01-28 02:01:56 +0100
commit895143459866dcb373c93b8e674d1344a129a6df (patch)
tree1d63b4307bad010c670e23bd37bb9f91e6f67f36 /src/lib/video_mxf_decoder.cc
parentc0bc376cc04f36c92f7a136e405e4cb1ea16cf99 (diff)
Change how video timing is done.
This commit changes the approach with video timing. Previously, we would (more-or-less) try to use every video frame from the content in the output, hoping that they come at a constant frame rate. This is not always the case, however. Here we preserve the PTS of video frames, and then when one arrives we output whatever DCP video frames we can (at the regular DCP frame rate). Hopefully this will solve a range of sync problems, but it could also introduce new ones.
Diffstat (limited to 'src/lib/video_mxf_decoder.cc')
-rw-r--r--src/lib/video_mxf_decoder.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/video_mxf_decoder.cc b/src/lib/video_mxf_decoder.cc
index 40d3a461a..9f451297b 100644
--- a/src/lib/video_mxf_decoder.cc
+++ b/src/lib/video_mxf_decoder.cc
@@ -76,18 +76,18 @@ VideoMXFDecoder::pass ()
video->emit (
film(),
std::make_shared<J2KImageProxy>(_mono_reader->get_frame(frame), _size, AV_PIX_FMT_XYZ12LE, optional<int>()),
- frame
+ _next
);
} else {
video->emit (
film(),
std::make_shared<J2KImageProxy>(_stereo_reader->get_frame(frame), _size, dcp::Eye::LEFT, AV_PIX_FMT_XYZ12LE, optional<int>()),
- frame
+ _next
);
video->emit (
film(),
std::make_shared<J2KImageProxy>(_stereo_reader->get_frame(frame), _size, dcp::Eye::RIGHT, AV_PIX_FMT_XYZ12LE, optional<int>()),
- frame
+ _next
);
}