diff options
author | John Stebbins <[email protected]> | 2017-02-15 15:43:48 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2017-02-15 15:43:48 -0700 |
commit | 382abe51b895263d80e42e525307f57395d56d05 (patch) | |
tree | c660af0236c1c5a8e54d2bb13b43056f70a57453 /contrib/ffmpeg | |
parent | 7196e488673c9bfa8f6a626121379885665bd886 (diff) |
libav: fix mkv timestamps when initial_padding is set
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.
Diffstat (limited to 'contrib/ffmpeg')
-rw-r--r-- | contrib/ffmpeg/A09-mkv-block-ts-offset.patch | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/contrib/ffmpeg/A09-mkv-block-ts-offset.patch b/contrib/ffmpeg/A09-mkv-block-ts-offset.patch new file mode 100644 index 000000000..fdf883439 --- /dev/null +++ b/contrib/ffmpeg/A09-mkv-block-ts-offset.patch @@ -0,0 +1,12 @@ +diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c +index e951a0f..2fe6e0e 100644 +--- a/libavformat/matroskaenc.c ++++ b/libavformat/matroskaenc.c +@@ -1461,6 +1461,7 @@ static void mkv_write_block(AVFormatContext *s, AVIOContext *pb, + uint8_t *data = NULL; + int offset = 0, size = pkt->size; + int64_t ts = mkv->tracks[pkt->stream_index].write_dts ? pkt->dts : pkt->pts; ++ ts += mkv->tracks[pkt->stream_index].ts_offset; + + av_log(s, AV_LOG_DEBUG, "Writing block at offset %" PRIu64 ", size %d, " + "pts %" PRId64 ", dts %" PRId64 ", duration %" PRId64 ", flags %d\n", |