From 4eea45050fa33f09dabba58488af300e26fa10b1 Mon Sep 17 00:00:00 2001 From: walkawayy <81546780+walkawayy@users.noreply.github.com> Date: Mon, 24 Jul 2023 21:43:59 -0400 Subject: [PATCH] fix timestamp seek --- src/specific/s_audio_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/specific/s_audio_stream.c b/src/specific/s_audio_stream.c index 03e771758..fa970dfa4 100644 --- a/src/specific/s_audio_stream.c +++ b/src/specific/s_audio_stream.c @@ -554,7 +554,7 @@ bool S_Audio_StreamSeekTimestamp(int sound_id, int64_t timestamp) LOG_DEBUG("Seeking timestamp %d on sound_id %d.", timestamp, sound_id); SDL_LockAudioDevice(g_AudioDeviceID); AUDIO_STREAM_SOUND *stream = &m_StreamSounds[sound_id]; - av_seek_frame(stream->av.format_ctx, -1, timestamp, AVSEEK_FLAG_ANY); + av_seek_frame(stream->av.format_ctx, sound_id, timestamp, AVSEEK_FLAG_ANY); avcodec_flush_buffers(stream->av.codec_ctx); // ? SDL_UnlockAudioDevice(g_AudioDeviceID); return true;