Commit 44b428fb06 for ffmpeg
commit 44b428fb061ba32cf05b2bee60b634f831b3ec44
Author: Romain Beauxis <romain.beauxis@gmail.com>
Date: Fri Nov 27 13:20:13 2026 -0600
avcodec/opus/tab: name the pre-roll a decoder needs after a seek
A decoder started inside an Opus stream needs a pre-roll to converge.
400 ms gives it more time than the 80 ms minimum of RFC 7845.
A finite pre-roll does not guarantee bit-exact output.
diff --git a/libavcodec/opus/tab.h b/libavcodec/opus/tab.h
index 5e114a1a73..0d8a87a6c1 100644
--- a/libavcodec/opus/tab.h
+++ b/libavcodec/opus/tab.h
@@ -34,6 +34,13 @@
*/
#define OPUS_TIMESTAMP_RATE 48000
+/**
+ * The pre-roll given to a decoder started inside the stream, in microseconds.
+ * It gives the decoder more time to converge than the 80 ms minimum of
+ * RFC 7845. A finite pre-roll does not guarantee bit-exact output.
+ */
+#define OPUS_SEEK_PREROLL_US 400000
+
FF_VISIBILITY_PUSH_HIDDEN
extern const uint16_t ff_opus_frame_duration[32];