Merge master.
[dcpomatic.git] / test / ffmpeg_decoder_seek_test.cc
index 76124786e8bb611be7fc44c30bf6a17d50ef3877..968c3bdf910eb0265441739ae4b07a7783cfb172 100644 (file)
 
 */
 
+/** @file  test/ffmpeg_decoder_seek_test.cc
+ *  @brief Check that get_video() returns the frame indexes that we ask for
+ *  for FFmpegDecoder.
+ *
+ *  This doesn't check that the contents of those frames are right, which
+ *  it probably should.
+ */
+
 #include <vector>
 #include <boost/test/unit_test.hpp>
 #include <boost/filesystem.hpp>
 
 using std::cerr;
 using std::vector;
+using std::list;
 using boost::shared_ptr;
 using boost::optional;
 
 static void
 check (FFmpegDecoder& decoder, int frame)
 {
-       optional<ContentVideo> v;
+       list<ContentVideo> v;
        v = decoder.get_video (frame, true);
-       BOOST_CHECK (v);
-       BOOST_CHECK_EQUAL (v->frame, frame);
+       BOOST_CHECK (v.size() == 1);
+       BOOST_CHECK_EQUAL (v.front().frame, frame);
 }
 
 static void