X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fffmpeg_decoder_seek_test.cc;h=c15bf8c98525c72d939dc601a45d70b59dfe3120;hb=0a93237cb5e4642d3b698ff9b7d0cfae5401478c;hp=dd80765f419e6e4e3bc9995fd602271f9e934758;hpb=233bb3f790aef3c8f9a7a7fde9875833b7dc1dfb;p=dcpomatic.git diff --git a/test/ffmpeg_decoder_seek_test.cc b/test/ffmpeg_decoder_seek_test.cc index dd80765f4..c15bf8c98 100644 --- a/test/ffmpeg_decoder_seek_test.cc +++ b/test/ffmpeg_decoder_seek_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2015 Carl Hetherington 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 @@ -36,16 +36,17 @@ using std::cerr; using std::vector; +using std::list; using boost::shared_ptr; using boost::optional; static void -check (FFmpegDecoder& decoder, int frame) +check (shared_ptr decoder, int frame) { - optional v; - v = decoder.get_video (frame, true); - BOOST_CHECK (v); - BOOST_CHECK_EQUAL (v->frame, frame); + list v; + v = decoder->get_video (frame, true); + BOOST_CHECK (v.size() == 1); + BOOST_CHECK_EQUAL (v.front().frame, frame); } static void @@ -62,7 +63,7 @@ test (boost::filesystem::path file, vector frames) film->examine_and_add_content (content); wait_for_jobs (); shared_ptr log (new NullLog); - FFmpegDecoder decoder (content, log); + shared_ptr decoder (new FFmpegDecoder (content, log)); for (vector::const_iterator i = frames.begin(); i != frames.end(); ++i) { check (decoder, *i);