summaryrefslogtreecommitdiffstats
path: root/demux
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-02-27 22:29:40 +0100
committerwm4 <wm4@nowhere>2020-02-27 22:30:46 +0100
commit05564af1ac22fcea080c6f8bb993744a1a4cadd6 (patch)
treee7962c1536a02ad9b1cd6abb76214d1e84bdd802 /demux
parentb56e2efd5f3d2ed5e62fe02acdaedef03b2d2fbc (diff)
downloadmpv-05564af1ac22fcea080c6f8bb993744a1a4cadd6.tar.bz2
mpv-05564af1ac22fcea080c6f8bb993744a1a4cadd6.tar.xz
demux_mkv: document probe-start-time option and enable it by default
This is useful with live streams, and it's not much worse than the h264 first packet hack, which reads some data anyway. For some reason, the option wasn't even documented, so do that. In addition, print the start time even if it's negative. That should not be possible, but for some reason, the field is an int64_t copied from an uint64_t so... whatever. Keeping the logging slightly more straight forward is better anyway.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_mkv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 99e481bc7d..a65afbfbc5 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -244,6 +244,7 @@ const struct m_sub_options demux_mkv_conf = {
.subtitle_preroll = 2,
.subtitle_preroll_secs = 1.0,
.subtitle_preroll_secs_index = 10.0,
+ .probe_start_time = 1,
},
};
@@ -3211,7 +3212,7 @@ static void probe_first_timestamp(struct demuxer *demuxer)
demuxer->start_time = mkv_d->cluster_tc / 1e9;
- if (demuxer->start_time > 0)
+ if (demuxer->start_time)
MP_VERBOSE(demuxer, "Start PTS: %f\n", demuxer->start_time);
}