forked from mia/Aegisub
Don't try to synch audio when there is no audio player/provider present. (Could cause a crash under certain rare conditions.) Thanks Avi for report and fix.
Originally committed to SVN as r2871.
This commit is contained in:
parent
606abde1a3
commit
8c44d698e4
1 changed files with 1 additions and 1 deletions
|
@ -750,7 +750,7 @@ void VideoContext::OnPlayTimer(wxTimerEvent &event) {
|
|||
if (nextFrame == frame_n) return;
|
||||
|
||||
// Next frame is before or over 2 frames ahead, so force audio resync
|
||||
if (keepAudioSync && (nextFrame < frame_n || nextFrame > frame_n + 2)) audio->player->SetCurrentPosition(audio->GetSampleAtMS(VFR_Output.GetTimeAtFrame(nextFrame)));
|
||||
if (audio->player && keepAudioSync && (nextFrame < frame_n || nextFrame > frame_n + 2)) audio->player->SetCurrentPosition(audio->GetSampleAtMS(VFR_Output.GetTimeAtFrame(nextFrame)));
|
||||
|
||||
// Jump to next frame
|
||||
playNextFrame = nextFrame;
|
||||
|
|
Loading…
Reference in a new issue