Apply the remainder of a 1.x patch; a test.
[dcpomatic.git] / test / ffmpeg_pts_offset_test.cc
index 9a9785d281c26a69e4d4e5eba9184b4037b09649..94e7223ab394641a3a64940e2dac24a1d0e65804 100644 (file)
@@ -25,6 +25,7 @@
 #include "lib/film.h"
 #include "lib/ffmpeg_decoder.h"
 #include "lib/ffmpeg_content.h"
+#include "lib/ffmpeg_audio_stream.h"
 #include "test.h"
 
 using boost::shared_ptr;
@@ -75,6 +76,6 @@ BOOST_AUTO_TEST_CASE (ffmpeg_pts_offset_test)
                content->_first_video = ContentTime::from_seconds (frame + 0.0215 + 4.1);
                content->_audio_stream->first_audio = ContentTime::from_seconds (4.1);
                FFmpegDecoder decoder (content, film->log());
-               BOOST_CHECK_EQUAL (decoder._pts_offset.seconds(), (frame - 0.0215) - 4.1);
+               BOOST_CHECK_CLOSE (decoder._pts_offset.seconds(), (frame - 0.0215) - 4.1, 0.1);
        }
 }