From 1cf1a5afe2f22fe71d84ad81ddc0e55413ee56bd Mon Sep 17 00:00:00 2001 From: John Stebbins Date: Wed, 15 Feb 2017 15:47:49 -0700 Subject: muxavformat: Inform muxer of encoder delay initial_padding is used to inform libav muxers of initial encoder delay duration. When set for mkv it can be used to remove the silence samples during playback since the delay value gets stored in the mkv CodecDelay element. --- libhb/muxavformat.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libhb/muxavformat.c') diff --git a/libhb/muxavformat.c b/libhb/muxavformat.c index 729e6c672..6c56f8a5f 100644 --- a/libhb/muxavformat.c +++ b/libhb/muxavformat.c @@ -401,6 +401,8 @@ static int avformatInit( hb_mux_object_t * m ) } track->st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; + track->st->codecpar->initial_padding = audio->priv.config.init_delay * + audio->config.out.samplerate / 90000; if (job->mux == HB_MUX_AV_MP4) { track->st->time_base.num = 1; -- cgit v1.2.3