Video not being set to the specified frame

Hello,

So I have come to find that the VideoPlayer.frame property does not get updated until the next Update() function is called in the class. That is fine and all is dandy having that understanding.

BUT the issue occurs when I am trying to set it to the final frame or give or take 10 frames. This happens maybe once out of 7 times. It will get hung up for a split second after setting the videoPlayer.time = videoPlayer.clip.length. And then not even set the frame and just continue playing.

Any insight on this problem? I am not sure if it’s a bug or if it’s a problem with our videos. I have a scrubber and it seems to work absolutely fine using nearly identical code if not more complex.

The code for setting the frame to the final frame:
videoPlayer.time = (long)videoPlayer.clip.length;
The code for setting the frame using the scrubber:
videoPlayer.time = progressBarSlider.value;

Edit: More of the English language being used

After finding this block of code in another post I have tried to implement it in place of my original code.

var nFrame = (int)Mathf.Clamp(videoPlayer.clip.frameCount, 0, videoPlayer.clip.frameCount);
videoPlayer.frame = nFrame;

Debug.Log(nFrame);

It resulted in THE SAME EXACT RESULT.

The videoPlayer.frameCount is equal is 1950.
var nFrame, after being assigned with the Mathf.Clamp, is equal to 1950.

And it still gets hung up for a second and then continues playing where it left off.
Again, the other 6-ish times, it worked fined.

Can a Unity Dev comment on this? It has to be a bug.