Codecs: Fix stuck buffer when advance_buffer fails

Fixes FS#9186 (constant noise at the end of truncated flac file)

Change-Id: I516282e48cecb2be009b5779115395a50edb6fdc
This commit is contained in:
Roman Artiukhin 2025-06-01 12:07:45 +03:00
parent c464a81e00
commit 2334e08d72

View file

@ -269,6 +269,7 @@ static bool codec_advance_buffer_counters(size_t amount)
{
if (bufadvance(ci.audio_hid, amount) < 0)
{
bufseek(ci.audio_hid, ci.filesize);
ci.curpos = ci.filesize;
return false;
}