core, demux: fix --identify chapter output with ordered chapters
commite3f5043233336d8b4b0731c6a8b42a8fda5535ac
authorwm4 <wm4@mplayer2.org>
Sun, 23 Oct 2011 02:51:44 +0000 (23 04:51 +0200)
committerUoti Urpala <uau@mplayer2.org>
Tue, 25 Oct 2011 19:09:33 +0000 (25 22:09 +0300)
tree2a1c05f2b117da2276f57ddf8b0409504c536689
parentc0b7851f23b561aa708a78f00961652603a18013
core, demux: fix --identify chapter output with ordered chapters

Information about individual chapters was printed during demuxer
opening phase, and total chapter count (ID_CHAPTERS) was printed
according to mpctx->demuxer->num_chapters. When playing a file with
ordered chapters, this meant that chapter information about every
source file was printed individually (even though only the chapters
from the first file would be used for playback) and the total chapter
count could be wrong. Remove the printing of chapter information from
the demuxer layer and print the chapter information and count actually
used for playback in core print_file_properties().

Also somewhat simplify the internal chapters API and remove possible
inconsistencies.
command.c
libmpdemux/demuxer.c
libmpdemux/demuxer.h
mp_core.h
mplayer.c