Because of the conditions to break out of the main loop being checked after
the video is played, execution will always loop once. There are several
possible solutions:
1: Play the file after checking the loop conditions. This has the
risk of possibly not playing the video at all, if the condtions are
not correct.
2: Set the "first play" flag to false after playing the file (before
checking the loop conditions).
Option 2 seems best, because it guarantees that the video file is always
played at least once. Since the "first play" flag is only ever used here,
it is actually not needed at all. the most elegant solution to this bug
is simply to remove the flag.
Fixes #45.
Because of the conditions to break out of the main loop being checked after the video is played, execution will always loop once. There are several possible solutions:
Option 2 seems best, because it guarantees that the video file is always played at least once. Since the "first play" flag is only ever used here, it is actually not needed at all. the most elegant solution to this bug is simply to remove the flag.