diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-01-11 23:00:25 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-01 01:12:38 +0100 |
| commit | 2f12058c535045cecc226fe47b3d60da8851a862 (patch) | |
| tree | cb4742d5fcd789cb34aba5791e5c7886de675d08 /src/lib/writer.cc | |
| parent | 82eeb266e009961b766bf7a5fc66fb8ba75a5d2a (diff) | |
Handle 2D/3D mismatches in the player (#2409).
Previously if there was 2D content in a 3D project (or vice versa)
the player would emit the video anyway and the encoder would have
to deal with it.
Since previously the FFmpeg encoder did not deal with this quite
right, it seems to make sense to move the logic into the player
so that neither encoder has to worry about it.
Diffstat (limited to 'src/lib/writer.cc')
| -rw-r--r-- | src/lib/writer.cc | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/lib/writer.cc b/src/lib/writer.cc index f7665a7a7..a36944723 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -153,19 +153,11 @@ Writer::write (shared_ptr<const Data> encoded, Frame frame, Eyes eyes) qi.reel = video_reel (frame); qi.frame = frame - _reels[qi.reel].start (); - if (film()->three_d() && eyes == Eyes::BOTH) { - /* 2D material in a 3D DCP; fake the 3D */ - qi.eyes = Eyes::LEFT; - _queue.push_back (qi); - ++_queued_full_in_memory; - qi.eyes = Eyes::RIGHT; - _queue.push_back (qi); - ++_queued_full_in_memory; - } else { - qi.eyes = eyes; - _queue.push_back (qi); - ++_queued_full_in_memory; - } + DCPOMATIC_ASSERT((film()->three_d() && eyes != Eyes::BOTH) || (!film()->three_d() && eyes == Eyes::BOTH)); + + qi.eyes = eyes; + _queue.push_back(qi); + ++_queued_full_in_memory; /* Now there's something to do: wake anything wait()ing on _empty_condition */ _empty_condition.notify_all (); |
