]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 17 Aug 2011 16:01:38 +0000 (16:01 +0000)
committerRonag <Ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Wed, 17 Aug 2011 16:01:38 +0000 (16:01 +0000)
modules/ffmpeg/producer/ffmpeg_producer.cpp

index 038ce5b9f61a370dc600fa6637b48d802b23f675..cd438f93d530f8d5dbc073923455973b770585c3 100644 (file)
@@ -85,7 +85,7 @@ struct ffmpeg_producer : public core::frame_producer
 \r
        const size_t                                                                    width_;\r
        const size_t                                                                    height_;\r
-       bool                                                                                    progressive_;\r
+       bool                                                                                    is_progressive_;\r
        \r
 public:\r
        explicit ffmpeg_producer(const safe_ptr<core::frame_factory>& frame_factory, const std::wstring& filename, const std::wstring& filter, bool loop, int start, int length) \r
@@ -104,7 +104,7 @@ public:
                , last_frame_(core::basic_frame::empty())\r
                , width_(video_decoder_.width())\r
                , height_(video_decoder_.height())\r
-               , progressive_(true)\r
+               , is_progressive_(true)\r
        {\r
                graph_->add_guide("frame-time", 0.5);\r
                graph_->set_color("frame-time", diagnostics::color(0.1f, 1.0f, 0.1f));\r
@@ -167,8 +167,7 @@ public:
                        auto video_frames = video_decoder_.poll();\r
                        BOOST_FOREACH(auto& video, video_frames)        \r
                        {\r
-                               if(video)\r
-                                       progressive_ &= video->interlaced_frame != 0;\r
+                               is_progressive_ = video ? video->interlaced_frame == 0 : is_progressive_;\r
                                muxer_.push(video, hints);      \r
                        }\r
                },\r
@@ -211,7 +210,7 @@ public:
        virtual std::wstring print() const\r
        {\r
                return L"ffmpeg[" + boost::filesystem::wpath(filename_).filename() + L"|" \r
-                                                 + boost::lexical_cast<std::wstring>(fps_) + (progressive_ ? L"p" : L"i") +L"|"\r
+                                                 + boost::lexical_cast<std::wstring>(fps_) + (is_progressive_ ? L"p" : L"i") +L"|"\r
                                                  + boost::lexical_cast<std::wstring>(width_) + L"x" + boost::lexical_cast<std::wstring>(height_) + L"]";\r
        }\r
 };\r