Skip to content

Commit

Permalink
Fix decoder hanging when given an invalid video file
Browse files Browse the repository at this point in the history
Fixes #6
  • Loading branch information
EIREXE committed Oct 17, 2023
1 parent bd6fe7d commit 1f54ef0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ffmpeg_video_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ void FFmpegVideoStreamPlayback::set_paused_internal(bool p_paused) {
}

void FFmpegVideoStreamPlayback::play_internal() {
if (!playing) {
if (!playing && decoder->get_decoder_state() == VideoDecoder::RUNNING) {
clear();
playback_position = 0;
decoder->seek(0, true);
Expand Down

0 comments on commit 1f54ef0

Please sign in to comment.