summaryrefslogtreecommitdiffstats
path: root/mplayer.c
diff options
context:
space:
mode:
Diffstat (limited to 'mplayer.c')
-rw-r--r--mplayer.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mplayer.c b/mplayer.c
index 983d397d79..88ea3930f0 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -3531,6 +3531,11 @@ if (mpctx->global_sub_size) {
}
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_LENGTH=%.2lf\n", demuxer_get_time_length(mpctx->demuxer));
mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_SEEKABLE=%d\n", mpctx->stream->seek ? 1 : 0);
+ if (mpctx->demuxer) {
+ if (mpctx->demuxer->num_chapters == 0)
+ stream_control(mpctx->demuxer->stream, STREAM_CTRL_GET_NUM_CHAPTERS, &mpctx->demuxer->num_chapters);
+ mp_msg(MSGT_IDENTIFY,MSGL_INFO,"ID_CHAPTERS=%d\n", mpctx->demuxer->num_chapters);
+ }
if(!mpctx->sh_video) goto main; // audio-only