diff options
author | Vignesh Venkatasubramanian <vigneshv-at-google.com@ffmpeg.org> | 2016-08-22 17:13:23 -0700 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2016-08-25 22:22:28 +0200 |
commit | 42a635ddae21ef4cd879c821a4da7508d345fdf8 (patch) | |
tree | 3965badd6fe811d5c76a3386ae23d00a65cec087 /libavformat/webm_chunk.c | |
parent | 425be3c810e019c7a1298be7219536fa28f7ba49 (diff) | |
download | ffmpeg-42a635ddae21ef4cd879c821a4da7508d345fdf8.tar.gz |
webm_chunk: Set pts precision to milliseconds
Milliseconds is the de-factor precision for timestamps in
Matroska/WebM media.
Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/webm_chunk.c')
-rw-r--r-- | libavformat/webm_chunk.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/webm_chunk.c b/libavformat/webm_chunk.c index 9db4fabdcd..44a1695d5c 100644 --- a/libavformat/webm_chunk.c +++ b/libavformat/webm_chunk.c @@ -110,6 +110,7 @@ static int webm_chunk_write_header(AVFormatContext *s) WebMChunkContext *wc = s->priv_data; AVFormatContext *oc = NULL; int ret; + int i; // DASH Streams can only have either one track per file. if (s->nb_streams != 1) { return AVERROR_INVALIDDATA; } @@ -135,6 +136,10 @@ static int webm_chunk_write_header(AVFormatContext *s) if (ret < 0) return ret; ff_format_io_close(s, &oc->pb); + for (i = 0; i < s->nb_streams; i++) { + // ms precision is the de-facto standard timescale for mkv files. + avpriv_set_pts_info(s->streams[i], 64, 1, 1000); + } return 0; } |