From 73735f8855c94f8cfb9f7404e7fc48964995015d Mon Sep 17 00:00:00 2001 From: Courville Software Date: Sat, 24 Aug 2024 23:16:44 +0200 Subject: [PATCH] stream: do not seek if not seekeable --- Source/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/stream.c b/Source/stream.c index d34d3e7..607c6de 100644 --- a/Source/stream.c +++ b/Source/stream.c @@ -532,7 +532,7 @@ int stream_set_av_speed( STREAM *s, float av_speed ) int stream_current_time = stream_get_current_time( s, NULL ); // returns real time audio_interface_change_audio_speed( s->audio_ctx, av_speed ); // seek to current time to flush and avoid any weird video catchup / timestamps in the past/future - if( stream_current_time > 0 ) stream_seek_time( s, stream_current_time, STREAM_SEEK_BACKWARD, 0 ); + if( stream_current_time > 0 && thread_state_get( &s->parser_tstate ) != THREAD_EXIT && s->parser->seekable && s->parser->seekable( s ) ) stream_seek_time( s, stream_current_time, STREAM_SEEK_BACKWARD, 0 ); else serprintf( "stream:stream_set_av_speed DO NOT SEEK stream_current_time=%d<=0\n", stream_current_time ); DBG serprintf( "stream:stream_set_av_speed current_time_before=%d current_time_now=%d\n", stream_current_time, stream_get_current_time( s, NULL ) ); } else {