cudacodec::VideoReader::get
returns incorect frame index for CAP_PROP_POS_FRAMES
#3541
Closed
4 tasks done
Labels
System information (version)
Detailed description
Due to the multi-threaded implementation of
VideoReader
, callingcudacodec::VideoReader::get()
withCAP_PROP_POS_FRAMES
will return the latest frame which has been input to the parser not the latest decoded frame as a user would expect.The easiest fix would be to internally store the decoded frame index in
VideoReaderImpl
and intercept queries forCAP_PROP_POS_FRAMES
inVideoReader::get
before they are internally passed toVideoCapture
.Steps to reproduce
iFrame
should be zero but it is guaranteed to be greater due to the fact thatcreateVideoReader
doesn't return until the decoder is initialized.Issue submission checklist
forum.opencv.org, Stack Overflow, etc and have not found any solution
The text was updated successfully, but these errors were encountered: