Skip to content

Commit

Permalink
stream: do not seek if not seekeable
Browse files Browse the repository at this point in the history
  • Loading branch information
courville committed Aug 24, 2024
1 parent e4a16b4 commit 73735f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 73735f8

Please sign in to comment.