summaryrefslogtreecommitdiffstats
path: root/libhb/muxavformat.c
diff options
context:
space:
mode:
authorJohn Stebbins <[email protected]>2017-02-15 15:47:49 -0700
committerJohn Stebbins <[email protected]>2017-02-15 15:47:49 -0700
commit1cf1a5afe2f22fe71d84ad81ddc0e55413ee56bd (patch)
treee65f6a749e5ef6345b08fca031ecd74219be45a2 /libhb/muxavformat.c
parent382abe51b895263d80e42e525307f57395d56d05 (diff)
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.
Diffstat (limited to 'libhb/muxavformat.c')
-rw-r--r--libhb/muxavformat.c2
1 files changed, 2 insertions, 0 deletions
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;