X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_decoder.cc;h=e4d5516a17ab020008cd02d7f665727d4f5db46e;hb=1b1bc528ee5ca1fee1bd33f9fb6f79cd551e3b33;hp=3a88911118e4054bf2c2d2eecae6b59a50fa055a;hpb=a5b59faff75265d3256ad0dbd9f0c69e51e31ce4;p=dcpomatic.git diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index 3a8891111..e4d5516a1 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -39,14 +39,23 @@ VideoDecoder::video (shared_ptr image, bool same, ContentTime time) { switch (_video_content->video_frame_type ()) { case VIDEO_FRAME_TYPE_2D: - _pending.push_back (shared_ptr (new DecodedVideo (image, EYES_BOTH, same, time))); + _pending.push_back (shared_ptr (new DecodedVideo (time, image, EYES_BOTH, same))); break; case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT: { int const half = image->size().width / 2; - _pending.push_back (shared_ptr (new DecodedVideo (image->crop (Crop (0, half, 0, 0), true), EYES_LEFT, same, time))); - _pending.push_back (shared_ptr (new DecodedVideo (image->crop (Crop (half, 0, 0, 0), true), EYES_RIGHT, same, time))); + _pending.push_back (shared_ptr (new DecodedVideo (time, image->crop (Crop (0, half, 0, 0), true), EYES_LEFT, same))); + _pending.push_back (shared_ptr (new DecodedVideo (time, image->crop (Crop (half, 0, 0, 0), true), EYES_RIGHT, same))); break; } + case VIDEO_FRAME_TYPE_3D_TOP_BOTTOM: + { + int const half = image->size().height / 2; + _pending.push_back (shared_ptr (new DecodedVideo (time, image->crop (Crop (0, 0, 0, half), true), EYES_LEFT, same))); + _pending.push_back (shared_ptr (new DecodedVideo (time, image->crop (Crop (0, 0, half, 0), true), EYES_RIGHT, same))); + break; + } + default: + assert (false); } }