mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
opus reset decoder on seek completion to prevent stack overflow
apparently we should be doing this anyway
mark4o> The packets overlap and may reuse state set by other recent packets,
so if you seek to a different position,
resetting the state helps to ensure that the subsequent
packets won't use the state set by the unrelated packets
that were processed before the seek.
remove stack bump WORKAROUND_FS13060
Change-Id: I1c14e23b1721a360b91e3e55202c1557aef0fcc6
This commit is contained in:
parent
8570d4063b
commit
0ff6a31d7d
2 changed files with 5 additions and 1 deletions
|
|
@ -413,6 +413,9 @@ enum codec_status codec_run(void)
|
|||
LOGF("Opus seek page:%lld,%lld,%ld\n",
|
||||
seek_target, page_granule, (long)param);
|
||||
opus_seek_page_granule(seek_target, page_granule, &oy, &os);
|
||||
/* reset the state to help ensure that subsequent packets won't
|
||||
use state set by unrelated packets processed before seek */
|
||||
opus_decoder_ctl(st, OPUS_RESET_STATE);
|
||||
}
|
||||
|
||||
ci->set_elapsed(param);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue