diff options
author | wm4 <wm4@nowhere> | 2013-06-03 21:49:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-06-03 22:40:32 +0200 |
commit | 61dfe121791adf953386642844cd9258ba99f179 (patch) | |
tree | af462c71bf0fba132a1e90ab89fc96ec779e6afe /sub/dec_sub.c | |
parent | 3289be9a2856c0f935fcb49768fc39d878044202 (diff) | |
download | mpv-61dfe121791adf953386642844cd9258ba99f179.tar.bz2 mpv-61dfe121791adf953386642844cd9258ba99f179.tar.xz |
sub: add name field to all sub decoders
Might help with debugging.
Diffstat (limited to 'sub/dec_sub.c')
-rw-r--r-- | sub/dec_sub.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sub/dec_sub.c b/sub/dec_sub.c index 4eb0dfa99f..b72630470c 100644 --- a/sub/dec_sub.c +++ b/sub/dec_sub.c @@ -115,6 +115,17 @@ void sub_set_ass_renderer(struct dec_sub *sub, struct ass_library *ass_library, sub->init_sd.ass_renderer = ass_renderer; } +static void print_chain(struct dec_sub *sub) +{ + mp_msg(MSGT_OSD, MSGL_V, "Subtitle filter chain: "); + for (int n = 0; n < sub->num_sd; n++) { + struct sd *sd = sub->sd[n]; + mp_msg(MSGT_OSD, MSGL_V, "%s%s (%s)", n > 0 ? " -> " : "", + sd->driver->name, sd->codec); + } + mp_msg(MSGT_OSD, MSGL_V, "\n"); +} + // Subtitles read with subreader.c static void read_sub_data(struct dec_sub *sub, struct sub_data *subdata) { @@ -218,6 +229,7 @@ void sub_init_from_sh(struct dec_sub *sub, struct sh_sub *sh) sub->num_sd++; // Try adding new converters until a decoder is reached if (sd->driver->get_bitmaps || sd->driver->get_text) { + print_chain(sub); if (sh->sub_data) read_sub_data(sub, sh->sub_data); return; |