summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-13 00:19:41 +0200
committerUoti Urpala <uau@glyph.nonexistent.invalid>2009-12-13 00:51:11 +0200
commit8e77ab12b812106f929f349bf4ceb495989bb23b (patch)
tree0a230465697e7653a89302769b1485d558067305 /mplayer.c
parent15f812898fa32db55681376df3fea759519167b9 (diff)
downloadmpv-8e77ab12b812106f929f349bf4ceb495989bb23b.tar.bz2
mpv-8e77ab12b812106f929f349bf4ceb495989bb23b.tar.xz
-identify output: use ordered chapters length for ID_LENGTH
Print the overall timeline length as ID_LENGTH instead of the length of the main file. This may help external GUIs handle ordered chapters somewhat better.
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mplayer.c b/mplayer.c
index 671e8c5039..73ee987227 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3832,7 +3832,9 @@ if (mpctx->global_sub_size) {
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_AUDIO_RATE=%d\n", mpctx->sh_audio->samplerate);
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_AUDIO_NCH=%d\n", mpctx->sh_audio->channels);
}
- mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_LENGTH=%.2lf\n", demuxer_get_time_length(mpctx->demuxer));
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_LENGTH=%.2lf\n", mpctx->timeline ?
+ mpctx->timeline[mpctx->num_timeline_parts].start :
+ demuxer_get_time_length(mpctx->demuxer));
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_SEEKABLE=%d\n",
mpctx->stream->seek && (!mpctx->demuxer || mpctx->demuxer->seekable));
if (mpctx->demuxer) {