summaryrefslogtreecommitdiff
path: root/libavformat/matroskaenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/matroskaenc.c')
-rw-r--r--libavformat/matroskaenc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c
index 225f6a6730..f057c0755a 100644
--- a/libavformat/matroskaenc.c
+++ b/libavformat/matroskaenc.c
@@ -742,13 +742,14 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv,
if (!(st->disposition & AV_DISPOSITION_DEFAULT))
put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGDEFAULT, !!(st->disposition & AV_DISPOSITION_DEFAULT));
- if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->delay) {
- mkv->tracks[i].ts_offset = av_rescale_q(codec->delay,
+ if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->initial_padding) {
+ mkv->tracks[i].ts_offset = av_rescale_q(codec->initial_padding,
(AVRational){ 1, codec->sample_rate },
st->time_base);
put_ebml_uint(pb, MATROSKA_ID_CODECDELAY,
- av_rescale_q(codec->delay, (AVRational){ 1, codec->sample_rate },
+ av_rescale_q(codec->initial_padding,
+ (AVRational){ 1, codec->sample_rate },
(AVRational){ 1, 1000000000 }));
}