From 9746e71efc36363f0b007fb73d886d5d35b5671a Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 3 Mar 2015 15:29:07 +0100 Subject: stream_cdda: add option to enable cdtext, and disable it by default Fixes #1615. --- stream/stream_cdda.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'stream') 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) -- cgit v1.2.3