VideoDecoder::_same can just be a local.
authorCarl Hetherington <cth@carlh.net>
Mon, 19 Jan 2015 00:15:24 +0000 (00:15 +0000)
committerCarl Hetherington <cth@carlh.net>
Mon, 19 Jan 2015 00:15:24 +0000 (00:15 +0000)
src/lib/video_decoder.cc
src/lib/video_decoder.h

index 8e6f11709a762770d7bc166c999b6200ba184948..cac5f27957d316d8ea3a6db53b9e1cce72e442bf 100644 (file)
@@ -41,7 +41,6 @@ VideoDecoder::VideoDecoder (shared_ptr<const VideoContent> c)
 #else
        : _video_content (c)
 #endif
-       , _same (false)
        , _last_seek_accurate (true)
 {
        _black_image.reset (new Image (PIX_FMT_RGB24, _video_content->video_size(), true));
@@ -237,7 +236,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, VideoFrame frame)
        /* We may receive the same frame index twice for 3D, and we need to know
           when that happens.
        */
-       _same = (!_decoded_video.empty() && frame == _decoded_video.back().frame);
+       bool const same = (!_decoded_video.empty() && frame == _decoded_video.back().frame);
 
        /* Work out what we are going to push into _decoded_video next */
        list<ContentVideo> to_push;
@@ -246,7 +245,7 @@ VideoDecoder::video (shared_ptr<const ImageProxy> image, VideoFrame frame)
                to_push.push_back (ContentVideo (image, EYES_BOTH, PART_WHOLE, frame));
                break;
        case VIDEO_FRAME_TYPE_3D_ALTERNATE:
-               to_push.push_back (ContentVideo (image, _same ? EYES_RIGHT : EYES_LEFT, PART_WHOLE, frame));
+               to_push.push_back (ContentVideo (image, same ? EYES_RIGHT : EYES_LEFT, PART_WHOLE, frame));
                break;
        case VIDEO_FRAME_TYPE_3D_LEFT_RIGHT:
                to_push.push_back (ContentVideo (image, EYES_LEFT, PART_LEFT_HALF, frame));
index f37d4b1ad8458f7b26176676e4c788a054e2d78d..4948cd8a0bc5afde2a250ea273e3187f110b0886 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -65,7 +65,6 @@ protected:
 
        boost::shared_ptr<const VideoContent> _video_content;
        std::list<ContentVideo> _decoded_video;
-       bool _same;
        boost::shared_ptr<Image> _black_image;
        boost::optional<ContentTime> _last_seek_time;
        bool _last_seek_accurate;