aboutsummaryrefslogtreecommitdiffhomepage
path: root/demux
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2015-10-26 18:21:31 +0100
committerGravatar wm4 <wm4@nowhere>2015-10-26 18:21:31 +0100
commit555ecbb70e80730a1203b91fd42da0927e1781dd (patch)
tree6f01cbebb81049b60d581f806937ec9ed91f02fd /demux
parent919707efb7f58633dadab272b941a330c4f7025b (diff)
demux_mkv: fix duration probing for files with non-0 start time
When using --demuxer-mkv-probe-video-duration=full and the file did not start at timestamp 0, the reported duration was still wrong.
Diffstat (limited to 'demux')
-rw-r--r--demux/demux_mkv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c
index 15c03de0bd..dafc668b86 100644
--- a/demux/demux_mkv.c
+++ b/demux/demux_mkv.c
@@ -2933,7 +2933,7 @@ static void probe_last_timestamp(struct demuxer *demuxer)
last_ts[STREAM_VIDEO] = mkv_d->cluster_tc;
if (last_ts[STREAM_VIDEO])
- mkv_d->duration = last_ts[STREAM_VIDEO] / 1e9;
+ mkv_d->duration = last_ts[STREAM_VIDEO] / 1e9 - demuxer->start_time;
stream_seek(demuxer->stream, old_pos);
mkv_d->cluster_start = mkv_d->cluster_end = 0;