Fix subtle bug with 3D and add a explicit to stop it happening again.
authorCarl Hetherington <cth@carlh.net>
Tue, 14 Jun 2016 11:21:40 +0000 (12:21 +0100)
committerCarl Hetherington <cth@carlh.net>
Tue, 14 Jun 2016 11:21:40 +0000 (12:21 +0100)
src/lib/video_decoder.cc
src/lib/video_frame.h

index fc3bcac39eda019d7037b2059d0e2cb605b52816..edc746010f082a0558617763798544b750a940d1 100644 (file)
@@ -252,7 +252,7 @@ VideoDecoder::give (shared_ptr<const ImageProxy> 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;
        }
index ac9a345af1d9c7d3837e51e4f0ed7f94bdc6ea8f..c197a94c8bfc2c35c08d195eaeaf26cfed0563a2 100644 (file)
@@ -31,7 +31,7 @@ public:
                , _eyes (EYES_BOTH)
        {}
 
-       VideoFrame (Frame i)
+       explicit VideoFrame (Frame i)
                : _index (i)
                , _eyes (EYES_BOTH)
        {}