From 809090f203ed82014ab0967b1fc52d7102b6631f Mon Sep 17 00:00:00 2001 From: Dmitry Kurtaev Date: Tue, 10 Jun 2025 14:51:32 +0300 Subject: [PATCH] Merge pull request #27421 from dkurt:dkurt-patch-1 Cover all seek directions in VideoCapture Java test #27421 ### Pull Request Readiness Checklist required for https://github.com/opencv/opencv/pull/27370 See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake --- modules/videoio/misc/java/test/VideoCaptureTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/videoio/misc/java/test/VideoCaptureTest.java b/modules/videoio/misc/java/test/VideoCaptureTest.java index db862a35d8..e7c72c7674 100644 --- a/modules/videoio/misc/java/test/VideoCaptureTest.java +++ b/modules/videoio/misc/java/test/VideoCaptureTest.java @@ -123,6 +123,10 @@ public class VideoCaptureTest extends OpenCVTestCase { { if (origin == 0) f.seek(offset); + else if (origin == 1) + f.seek(f.getFilePointer() + offset); + else if (origin == 2) + f.seek(f.length() + offset); return f.getFilePointer(); } catch (IOException e)