forked from mia/Aegisub
Issue #446 - Fixed some crashing while trying to play video without audio loaded, on posix
Originally committed to SVN as r1463.
This commit is contained in:
parent
1e1f7b411b
commit
1d6f2f90c6
1 changed files with 1 additions and 1 deletions
|
@ -741,7 +741,7 @@ void VideoContext::OnPlayTimer(wxTimerEvent &event) {
|
|||
JumpToFrame(nextFrame);
|
||||
|
||||
// Sync audio
|
||||
if (keepAudioSync && nextFrame % 10 == 0) {
|
||||
if (keepAudioSync && nextFrame % 10 == 0 && audio && audio->provider && audio->player) {
|
||||
__int64 audPos = audio->GetSampleAtMS(VFR_Output.GetTimeAtFrame(nextFrame));
|
||||
__int64 curPos = audio->player->GetCurrentPosition();
|
||||
int delta = int(audPos-curPos);
|
||||
|
|
Loading…
Reference in a new issue