Avoid an unnecessary assignment.
This commit is contained in:
committed by
abcdefg30
parent
a3ccc81892
commit
6edd5d7bfa
@@ -93,11 +93,9 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
|
|
||||||
if (!stopped && !paused)
|
if (!stopped && !paused)
|
||||||
{
|
{
|
||||||
var nextFrame = 0;
|
var nextFrame = video.CurrentFrame + 1;
|
||||||
if (video.HasAudio && !Game.Sound.DummyEngine)
|
if (video.HasAudio && !Game.Sound.DummyEngine)
|
||||||
nextFrame = (int)float2.Lerp(0, video.Frames, Game.Sound.VideoSeekPosition * invLength);
|
nextFrame = (int)float2.Lerp(0, video.Frames, Game.Sound.VideoSeekPosition * invLength);
|
||||||
else
|
|
||||||
nextFrame = video.CurrentFrame + 1;
|
|
||||||
|
|
||||||
// Without the 2nd check the sound playback sometimes ends before the final frame is displayed which causes the player to be stuck on the first frame
|
// Without the 2nd check the sound playback sometimes ends before the final frame is displayed which causes the player to be stuck on the first frame
|
||||||
if (nextFrame > video.Frames || nextFrame < video.CurrentFrame)
|
if (nextFrame > video.Frames || nextFrame < video.CurrentFrame)
|
||||||
|
|||||||
Reference in New Issue
Block a user