From a9f3a7de398b93b9c31c204d351aac012a48c901 Mon Sep 17 00:00:00 2001 From: Tomoaki Teshima Date: Mon, 5 Mar 2018 19:27:49 +0900 Subject: [PATCH] add workaround of old gstreamer --- modules/videoio/test/test_video_io.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/videoio/test/test_video_io.cpp b/modules/videoio/test/test_video_io.cpp index ef44aae266..20da25fe0f 100644 --- a/modules/videoio/test/test_video_io.cpp +++ b/modules/videoio/test/test_video_io.cpp @@ -112,6 +112,13 @@ public: { SCOPED_TRACE("consecutive read"); + if (apiPref == CAP_GSTREAMER) + { + // This workaround is for GStreamer 1.3.1.1 and older. + // Old Gstreamer has a bug which handles the total duration 1 frame shorter + // Old Gstreamer are used in Ubuntu 14.04, so the following code could be removed after it's EOL + n_frames--; + } for (int k = 0; k < n_frames; ++k) { checkFrameRead(k, cap);