diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-02-18 23:46:02 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2020-02-18 23:46:02 +0100 |
| commit | aac56f99cc6b649e75e0466d1ef1baf4f3937fff (patch) | |
| tree | b4590ffa0e35cf3ee1b6292d3a0bee33c563d386 | |
| parent | a9754317f7564f669f9588c28c500ee5702077a9 (diff) | |
Fix errors with TYPE_3D introduced in video timestamping fix.
| -rw-r--r-- | src/lib/video_decoder.cc | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index 142996b10..613ec9c73 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -60,6 +60,7 @@ VideoDecoder::emit (shared_ptr<const Film> film, shared_ptr<const ImageProxy> im } double const afr = _content->active_video_frame_rate(film); + VideoFrameType const vft = _content->video->frame_type(); Frame frame; if (!_position) { @@ -72,14 +73,17 @@ VideoDecoder::emit (shared_ptr<const Film> film, shared_ptr<const ImageProxy> im If we drop the frame with the duplicated timestamp we obviously lose sync. */ _position = ContentTime::from_frames (decoder_frame, afr); - if (_content->video->frame_type() == VIDEO_FRAME_TYPE_3D_ALTERNATE) { + if (vft == VIDEO_FRAME_TYPE_3D) { + frame = decoder_frame; + _last_emitted_eyes = EYES_RIGHT; + } else if (vft == VIDEO_FRAME_TYPE_3D_ALTERNATE) { frame = decoder_frame / 2; _last_emitted_eyes = EYES_RIGHT; } else { frame = decoder_frame; } } else { - if (_content->video->frame_type() == VIDEO_FRAME_TYPE_3D_ALTERNATE) { + if (vft == VIDEO_FRAME_TYPE_3D || vft == VIDEO_FRAME_TYPE_3D_ALTERNATE) { DCPOMATIC_ASSERT (_last_emitted_eyes); if (_last_emitted_eyes.get() == EYES_RIGHT) { frame = _position->frames_round(afr) + 1; |
