This value specifies the number of samples that must be discarded after
seeking.
While the codec spec itself does not deal with seeking at all, the
OggOpus spec mandates this to be "at least 3840 samples (80 ms)".
Matroska has a special field for this, but in practice it is apparently
always set to the same value.
---
I'm not fully convinced this is TheRightThing to do, since this is in principle
variable. But perhaps this is good enough until there's a need for a better
solution.
---
libavcodec/opusdec.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/opusdec.c b/libavcodec/opusdec.c
index 92e651c..27769df 100644
--- a/libavcodec/opusdec.c
+++ b/libavcodec/opusdec.c
@@ -665,6 +665,7 @@ static av_cold int opus_decode_init(AVCodecContext *avctx)
avctx->sample_fmt = AV_SAMPLE_FMT_FLTP;
avctx->sample_rate = 48000;
+ avctx->delay = 3840;
avpriv_float_dsp_init(&c->fdsp, 0);
--
2.0.0
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel