stream_cdda: add option to enable cdtext, and disable it by default

Fixes #1615.
This commit is contained in:
wm4
2015-03-03 15:29:07 +01:00
parent 1ba24d2585
commit 9746e71efc
2 changed files with 9 additions and 3 deletions

View File

@@ -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)