Full Theora video support in VideoStreamPlayer
- Implement `set_stream_position` and `get_stream_length`. - Don't show blank frame when stopping the video (smooth loops). - Fix audio for videos with up to 8 channels. - Improve internal audio handling.
This commit is contained in:
@ -339,7 +339,6 @@ void VideoStreamPlayer::play() {
|
||||
if (playback.is_null()) {
|
||||
return;
|
||||
}
|
||||
playback->stop();
|
||||
playback->play();
|
||||
set_process_internal(true);
|
||||
last_audio_time = 0;
|
||||
@ -468,7 +467,9 @@ double VideoStreamPlayer::get_stream_position() const {
|
||||
|
||||
void VideoStreamPlayer::set_stream_position(double p_position) {
|
||||
if (playback.is_valid()) {
|
||||
resampler.flush();
|
||||
playback->seek(p_position);
|
||||
last_audio_time = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user