diff options
author | wm4 <wm4@nowhere> | 2015-03-03 15:29:07 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-03-03 15:29:07 +0100 |
commit | 9746e71efc36363f0b007fb73d886d5d35b5671a (patch) | |
tree | 4b20bbd43908d24dbe60049270e5b89b46e59206 | |
parent | 1ba24d25853c0bb42526344345dc1c20741af338 (diff) | |
download | mpv-9746e71efc36363f0b007fb73d886d5d35b5671a.tar.bz2 mpv-9746e71efc36363f0b007fb73d886d5d35b5671a.tar.xz |
stream_cdda: add option to enable cdtext, and disable it by default
Fixes #1615.
-rw-r--r-- | DOCS/man/options.rst | 4 | ||||
-rw-r--r-- | stream/stream_cdda.c | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index e84151f78f..dec0740eb7 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -1944,6 +1944,10 @@ Disc Devices ``--cdda-skip=<yes|no>`` (Never) accept imperfect data reconstruction. +``--cdda-cdtext=<yes|no>`` + Print CD text. This is disabled by default, because it ruins perfomance + with CD-ROM drives for unknown reasons. + ``--dvd-speed=<speed>`` Try to limit DVD speed (default: 0, no change). DVD base speed is 1385 kB/s, so an 8x drive can read at speeds up to 11080 kB/s. Slower speeds diff --git a/stream/stream_cdda.c b/stream/stream_cdda.c index 8bb940032c..2d1c78e160 100644 --- a/stream/stream_cdda.c +++ b/stream/stream_cdda.c @@ -64,6 +64,7 @@ typedef struct cdda_params { int skip; char *device; int span[2]; + int cdtext; } cdda_priv; #define OPT_BASE_STRUCT struct cdda_params @@ -86,6 +87,7 @@ const struct m_sub_options stream_cdda_conf = { OPT_FLAG("skip", skip, 0), OPT_STRING("device", device, 0), OPT_INTPAIR("span", span, 0), + OPT_FLAG("cdtext", cdtext, 0), {0} }, .size = sizeof(struct cdda_params), @@ -117,9 +119,11 @@ static const char *const cdtext_name[] = { #endif }; -static bool print_cdtext(stream_t *s, int track) +static void print_cdtext(stream_t *s, int track) { cdda_priv* p = (cdda_priv*)s->priv; + if (!p->cdtext) + return; #ifdef OLD_API cdtext_t *text = cdio_get_cdtext(p->cd->p_cdio, track); #else @@ -141,9 +145,7 @@ static bool print_cdtext(stream_t *s, int track) MP_INFO(s, " %s: '%s'\n", name, value); } } - return true; } - return false; } static void print_track_info(stream_t *s, int track) |