X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fvideo_decoder.cc;h=edc746010f082a0558617763798544b750a940d1;hb=a8a0dfd1b21de6c0facf965ab119833ff6f790bf;hp=ec5ae8884b730cfc5f02c40f30e03ff3da2add29;hpb=4b7b0edb359ae68f2dbcab90c7c10382f507fa5b;p=dcpomatic.git diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index ec5ae8884..edc746010 100644 --- a/src/lib/video_decoder.cc +++ b/src/lib/video_decoder.cc @@ -252,7 +252,7 @@ VideoDecoder::give (shared_ptr image, Frame frame) /* We receive the same frame index twice for 3D-alternate; hence we know which frame this one is. */ - bool const same = (!_decoded.empty() && frame == _decoded.back().frame); + bool const same = (!_decoded.empty() && frame == _decoded.back().frame.index()); to_push.push_back (ContentVideo (image, VideoFrame (frame, same ? EYES_RIGHT : EYES_LEFT), PART_WHOLE)); break; } @@ -282,7 +282,10 @@ VideoDecoder::give (shared_ptr image, Frame frame) optional from; if (_decoded.empty() && _last_seek_time && _last_seek_accurate) { - from = VideoFrame (_last_seek_time->frames_round (_content->active_video_frame_rate ()), EYES_LEFT); + from = VideoFrame ( + _last_seek_time->frames_round (_content->active_video_frame_rate ()), + _content->video->frame_type() == VIDEO_FRAME_TYPE_2D ? EYES_BOTH : EYES_LEFT + ); } else if (!_decoded.empty ()) { from = _decoded.back().frame; ++(*from); @@ -292,7 +295,7 @@ VideoDecoder::give (shared_ptr image, Frame frame) (frames before the last seek time) which we can just ignore. */ - if (from && from->index() > to_push.front().frame.index()) { + if (from && (*from) > to_push.front().frame) { return; }