Merge master.
[dcpomatic.git] / src / lib / transcoder.cc
index 8146fc167928aa90e328b63d75dfd0ea89985a7c..a4cd36a4fb509f17ba6f58eae2729e0bb2901060 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 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
@@ -35,6 +35,8 @@
 #include "job.h"
 
 using std::string;
+using std::cout;
+using std::list;
 using boost::shared_ptr;
 using boost::weak_ptr;
 using boost::dynamic_pointer_cast;
@@ -59,7 +61,10 @@ Transcoder::go ()
 
        DCPTime const frame = DCPTime::from_frames (1, _film->video_frame_rate ());
        for (DCPTime t; t < _film->length(); t += frame) {
-               _encoder->process_video (_player->get_video (t, true));
+               list<shared_ptr<PlayerVideoFrame> > v = _player->get_video (t, true);
+               for (list<shared_ptr<PlayerVideoFrame> >::const_iterator i = v.begin(); i != v.end(); ++i) {
+                       _encoder->process_video (*i);
+               }
                _encoder->process_audio (_player->get_audio (t, frame, true));
        }