diff options
| author | Rémi Verschelde | 2016-10-03 11:59:55 +0200 |
|---|---|---|
| committer | GitHub | 2016-10-03 11:59:55 +0200 |
| commit | c939be88592a1d0085c4633cc61c844ffd95ac12 (patch) | |
| tree | eda82bf8a9ce150e84e89f738c854983fb80b8ad | |
| parent | 1dfa52ba59d6e6d9660e82202a77c2233b6f56e0 (diff) | |
| parent | 5585bc1c3886b37f7188b357ddcdbc76ca46f42c (diff) | |
| download | godot-c939be88592a1d0085c4633cc61c844ffd95ac12.tar.gz godot-c939be88592a1d0085c4633cc61c844ffd95ac12.tar.zst godot-c939be88592a1d0085c4633cc61c844ffd95ac12.zip | |
Merge pull request #6634 from zaps166/fix-resampler-crash
Don't crash when video is stopped and played again
| -rw-r--r-- | scene/gui/video_player.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index 1be847929..335672126 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -248,7 +248,7 @@ void VideoPlayer::stop() { playback->stop(); AudioServer::get_singleton()->stream_set_active(stream_rid,false); - resampler.clear(); + resampler.flush(); set_process(false); last_audio_time=0; }; @@ -426,5 +426,6 @@ VideoPlayer::~VideoPlayer() { if (stream_rid.is_valid()) AudioServer::get_singleton()->free(stream_rid); + resampler.clear(); //Not necessary here, but make in consistent with other "stream_player" classes }; |
