]> git.sesse.net Git - casparcg/commitdiff
write_frame: Removed incorrect copy assignment/ctor.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 31 Jan 2012 15:14:03 +0000 (15:14 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Tue, 31 Jan 2012 15:14:03 +0000 (15:14 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/trunk@2184 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

core/mixer/write_frame.cpp
core/mixer/write_frame.h
modules/ffmpeg/producer/muxer/frame_muxer.cpp

index 93889add103be9edf32c54ecfe1b7db91f01a8e0..6ec97cd6a236ddaf1770a357188a4bc2e6e1947e 100644 (file)
@@ -111,14 +111,8 @@ struct write_frame::implementation
 write_frame::write_frame(const void* tag) : impl_(new implementation(tag)){}\r
 write_frame::write_frame(const safe_ptr<ogl_device>& ogl, const void* tag, const core::pixel_format_desc& desc) \r
        : impl_(new implementation(ogl, tag, desc)){}\r
-write_frame::write_frame(const write_frame& other) : impl_(new implementation(*other.impl_)){}\r
 write_frame::write_frame(write_frame&& other) : impl_(std::move(other.impl_)){}\r
-write_frame& write_frame::operator=(const write_frame& other)\r
-{\r
-       basic_frame temp(other);\r
-       temp.swap(*this);\r
-       return *this;\r
-}\r
+\r
 write_frame& write_frame::operator=(write_frame&& other)\r
 {\r
        write_frame temp(std::move(other));\r
index 7c75d021daeff90f9272e3ac6297eb496eb8b9e8..2330a079cdb5ca72f6efa576543eb8e661a4bdcf 100644 (file)
@@ -40,26 +40,25 @@ struct frame_visitor;
 struct pixel_format_desc;\r
 class ogl_device;      \r
 \r
-class write_frame : public core::basic_frame, boost::noncopyable\r
+class write_frame : public core::basic_frame\r
 {\r
+       write_frame(const write_frame&);\r
+       write_frame& operator=(const write_frame&);\r
 public:        \r
        explicit write_frame(const void* tag);\r
        explicit write_frame(const safe_ptr<ogl_device>& ogl, const void* tag, const core::pixel_format_desc& desc);\r
 \r
-       write_frame(const write_frame& other);\r
        write_frame(write_frame&& other);\r
-\r
-       write_frame& operator=(const write_frame& other);\r
        write_frame& operator=(write_frame&& other);\r
+\r
+       void swap(write_frame& other);\r
                        \r
        // basic_frame\r
 \r
        virtual void accept(frame_visitor& visitor) override;\r
 \r
        // write _frame\r
-\r
-       void swap(write_frame& other);\r
-                       \r
+                               \r
        boost::iterator_range<uint8_t*> image_data(size_t plane_index = 0);     \r
        audio_buffer& audio_data();\r
        \r
index 86143143b7c0ad8509c9477fb32542d74a2d2ee8..929cf23b07b98dfac889c336ed9da4ada9a6045f 100644 (file)
@@ -249,11 +249,10 @@ struct frame_muxer::implementation : boost::noncopyable
                        }\r
                case display_mode::duplicate:   \r
                        {\r
-                               auto frame2                             = make_safe<core::write_frame>(*frame1);\r
-                               frame2->audio_data()    = pop_audio();\r
+                               boost::range::push_back(frame1->audio_data(), pop_audio());\r
 \r
                                frame_buffer_.push(frame1);\r
-                               frame_buffer_.push(frame2);\r
+                               frame_buffer_.push(frame1);\r
                                break;\r
                        }\r
                case display_mode::half:        \r