From e3f5043233336d8b4b0731c6a8b42a8fda5535ac Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 23 Oct 2011 04:51:44 +0200 Subject: 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. --- libmpdemux/demuxer.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'libmpdemux/demuxer.h') diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index 6cdad7911a..55fda059fe 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -400,15 +400,13 @@ int demuxer_add_attachment(struct demuxer *demuxer, struct bstr name, struct bstr type, struct bstr data); int demuxer_add_chapter(struct demuxer *demuxer, struct bstr name, uint64_t start, uint64_t end); -int demuxer_seek_chapter(struct demuxer *demuxer, int chapter, double *seek_pts, - char **chapter_name); +int demuxer_seek_chapter(struct demuxer *demuxer, int chapter, + double *seek_pts); /// Get current chapter index if available. int demuxer_get_current_chapter(struct demuxer *demuxer, double time_now); /// Get chapter name by index if available. char *demuxer_chapter_name(struct demuxer *demuxer, int chapter); -/// Get chapter display name by index. -char *demuxer_chapter_display_name(struct demuxer *demuxer, int chapter); /// Get chapter start time and end time by index if available. float demuxer_chapter_time(struct demuxer *demuxer, int chapter, float *end); /// Get total chapter number. -- cgit v1.2.3