mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
ffmpeg: don't hide last frame of video
This is not quite a complete fix, since the last frame of the video won't be shown long enough for it to matter when looping the video. A more complete fix may be needed later.
This commit is contained in:
parent
43a5f2a9f2
commit
749e09d49e
@ -327,13 +327,13 @@ set_time(double timestamp, int loop_count) {
|
||||
|
||||
if (_eof_known) {
|
||||
if (loop_count == 0) {
|
||||
frame = frame % _eof_frame;
|
||||
frame = frame % (_eof_frame + 1);
|
||||
} else {
|
||||
int last_frame = _eof_frame * loop_count;
|
||||
int last_frame = (_eof_frame + 1) * loop_count;
|
||||
if (frame < last_frame) {
|
||||
frame = frame % _eof_frame;
|
||||
frame = frame % (_eof_frame + 1);
|
||||
} else {
|
||||
frame = _eof_frame - 1;
|
||||
frame = _eof_frame;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user