From 0a86296b26724366f94648bdec9deb2518dc7d84 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 26 Jul 2004 20:39:25 +0000 Subject: [PATCH] Limited support for extracting CUE sheets from chapters not created with mkvmerge's "--chapters" option. --- ChangeLog | 4 ++++ src/mkvextract_cuesheets.cpp | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/ChangeLog b/ChangeLog index 09d5bfab6..9b27d2e29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2004-07-26 Moritz Bunkus + * mkvextract: new feature: Limited support for extracting chapters + as CUE sheets that haven't been created by using a CUE sheet with + mkvmerge's "--chapters" option. + * mkvmerge: bug fix: Block durations with 0s length (e.g. entries in a SSA file) were not written. diff --git a/src/mkvextract_cuesheets.cpp b/src/mkvextract_cuesheets.cpp index 0e7a64a43..7cecfab2b 100644 --- a/src/mkvextract_cuesheets.cpp +++ b/src/mkvextract_cuesheets.cpp @@ -330,6 +330,15 @@ write_cuesheet(const char *file_name, print_if_available("DATE", " REM DATE %s\n"); print_if_available("GENRE", " REM GENRE %s\n"); print_comments(" ", *tag, out); + } else { + index_01 = get_chapter_start(atom); + out.printf(" TITLE \"%s\"\n", + get_chapter_name(atom).c_str()); + out.printf(" INDEX 01 %02lld:%02lld:%02lld\n", + index_01 / 1000000 / 1000 / 60, + (index_01 / 1000000 / 1000) % 60, + irnd((double)(index_01 % 1000000000ll) * 75.0 / + 1000000000.0)); } } }