mirror of https://github.com/odrling/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
800e57897b
commit
876f726a6d
|
@ -750,7 +750,7 @@ void VideoContext::OnPlayTimer(wxTimerEvent &event) {
|
||||||
if (nextFrame == frame_n) return;
|
if (nextFrame == frame_n) return;
|
||||||
|
|
||||||
// Next frame is before or over 2 frames ahead, so force audio resync
|
// 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
|
// Jump to next frame
|
||||||
playNextFrame = nextFrame;
|
playNextFrame = nextFrame;
|
||||||
|
|
Loading…
Reference in New Issue