| @@ -742,13 +742,14 @@ static int mkv_write_track(AVFormatContext *s, MatroskaMuxContext *mkv, · 741 unmodified lines |
| 742 | if (!(st->disposition & AV_DISPOSITION_DEFAULT)) | 742 | if (!(st->disposition & AV_DISPOSITION_DEFAULT)) |
| 743 | put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGDEFAULT, !!(st->disposition & AV_DISPOSITION_DEFAULT)); | 743 | put_ebml_uint(pb, MATROSKA_ID_TRACKFLAGDEFAULT, !!(st->disposition & AV_DISPOSITION_DEFAULT)); |
| 744 | | 744 | |
| 745 | if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->delay) { | 745 | if (codec->codec_type == AVMEDIA_TYPE_AUDIO && codec->initial_padding) { |
| 746 | mkv->tracks[i].ts_offset = av_rescale_q(codec->delay, | 746 | mkv->tracks[i].ts_offset = av_rescale_q(codec->initial_padding, |
| 747 | (AVRational){ 1, codec->sample_rate }, | 747 | (AVRational){ 1, codec->sample_rate }, |
| 748 | st->time_base); | 748 | st->time_base); |
| 749 | | 749 | |
| 750 | put_ebml_uint(pb, MATROSKA_ID_CODECDELAY, | 750 | put_ebml_uint(pb, MATROSKA_ID_CODECDELAY, |
| 751 | av_rescale_q(codec->delay, (AVRational){ 1, codec->sample_rate }, | 751 | av_rescale_q(codec->initial_padding, |
| | 752 | (AVRational){ 1, codec->sample_rate }, |
| 752 | (AVRational){ 1, 1000000000 })); | 753 | (AVRational){ 1, 1000000000 })); |
| 753 | } | 754 | } |
| 754 | | 755 | |