summaryrefslogtreecommitdiffstats
path: root/lib/rbcodec/codecs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec/codecs')
-rw-r--r--lib/rbcodec/codecs/opus.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rbcodec/codecs/opus.c b/lib/rbcodec/codecs/opus.c
index f0ad5e8ba4..c34c0b885b 100644
--- a/lib/rbcodec/codecs/opus.c
+++ b/lib/rbcodec/codecs/opus.c
@@ -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);