On 7/1/2016 5:14 AM, Anton Khirnov wrote: > 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.
Ideally, and following Matroska's choice, the seek preroll would be its own value separate from the codec_delay one. That's how Google also thought it should be. https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=571efd972986c857c50f2ddc6e3cfb320f06450f https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=0f99aad80f656c1bb0fca8034f17447dfc7a1876 https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=d6f86d74edfa6e1464ddc613726559269bf1dc7b https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=129e24f78e5dd2166211156346872ee92545b8a4 https://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=3fafde6cbe345d2f84cfe61b94d4a823990969b3 > --- > 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); > > _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
