Skip to content

Commit

Permalink
fix timestamp seek
Browse files Browse the repository at this point in the history
  • Loading branch information
walkawayy committed Jul 25, 2023
1 parent 4dd58d2 commit 4eea450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/specific/s_audio_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4eea450

Please sign in to comment.