From: Carl Hetherington Date: Tue, 14 Jun 2016 11:21:40 +0000 (+0100) Subject: Fix subtle bug with 3D and add a explicit to stop it happening again. X-Git-Tag: v2.8.10~21 X-Git-Url: https://git.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=3b74655a04bdac7d8fa0258225a9d3bedd170170 Fix subtle bug with 3D and add a explicit to stop it happening again. --- diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc index fc3bcac39..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; } diff --git a/src/lib/video_frame.h b/src/lib/video_frame.h index ac9a345af..c197a94c8 100644 --- a/src/lib/video_frame.h +++ b/src/lib/video_frame.h @@ -31,7 +31,7 @@ public: , _eyes (EYES_BOTH) {} - VideoFrame (Frame i) + explicit VideoFrame (Frame i) : _index (i) , _eyes (EYES_BOTH) {}