summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/options.rst12
-rw-r--r--demux/demux_mkv.c18
2 files changed, 1 insertions, 29 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 4a1951effe..adf3f994be 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -2245,18 +2245,6 @@ Demuxer
file and can make a reliable estimate even without an index present (such
as partial files).
-``--demuxer-mkv-fix-timestamps=<yes|no>``
- Fix rounded Matroska timestamps (disabled by default). Matroska usually
- stores timestamps rounded to milliseconds. This means timestamps jitter
- by some amount around the intended timestamp. mpv can correct the timestamps
- based on the framerate value stored in the file: the timestamp is rounded
- to the next frame (according to the framerate), unless the new timestamp
- would deviate more than 1ms from the old one. This should undo the rounding
- done by the muxer.
-
- (The allowed deviation can be less than 1ms if the file uses a non-standard
- timecode scale.)
-
``--demuxer-rawaudio-channels=<value>``
Number of channels (or channel layout) if ``--demuxer=rawaudio`` is used
(default: stereo).
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 9d0a294b02..733e441feb 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -203,7 +203,6 @@ struct demux_mkv_opts {
double subtitle_preroll_secs;
int probe_duration;
int probe_start_time;
- int fix_timestamps;
};
const struct m_sub_options demux_mkv_conf = {
@@ -214,14 +213,12 @@ const struct m_sub_options demux_mkv_conf = {
OPT_CHOICE("probe-video-duration", probe_duration, 0,
({"no", 0}, {"yes", 1}, {"full", 2})),
OPT_FLAG("probe-start-time", probe_start_time, 0),
- OPT_FLAG("fix-timestamps", fix_timestamps, 0),
{0}
},
.size = sizeof(struct demux_mkv_opts),
.defaults = &(const struct demux_mkv_opts){
.subtitle_preroll_secs = 1.0,
.probe_start_time = 1,
- .fix_timestamps = 0,
},
};
@@ -2362,19 +2359,6 @@ exit:
return res;
}
-static double fix_timestamp(demuxer_t *demuxer, mkv_track_t *track, double ts)
-{
- mkv_demuxer_t *mkv_d = demuxer->priv;
- if (demuxer->opts->demux_mkv->fix_timestamps && track->default_duration > 0) {
- // Assume that timestamps have been rounded to the timecode scale.
- double quant = MPMIN(mkv_d->tc_scale / 1e9, 0.001);
- double rts = rint(ts / track->default_duration) * track->default_duration;
- if (fabs(rts - ts) < quant)
- ts = rts;
- }
- return ts;
-}
-
static int handle_block(demuxer_t *demuxer, struct block_info *block_info)
{
mkv_demuxer_t *mkv_d = (mkv_demuxer_t *) demuxer->priv;
@@ -2397,7 +2381,7 @@ static int handle_block(demuxer_t *demuxer, struct block_info *block_info)
return 0;
}
- current_pts = fix_timestamp(demuxer, track, tc / 1e9) - track->codec_delay;
+ current_pts = tc / 1e9 - track->codec_delay;
if (track->type == MATROSKA_TRACK_AUDIO) {
if (mkv_d->a_skip_to_keyframe)