summaryrefslogtreecommitdiffstats
path: root/sub/sd_srt.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-21 19:06:37 +0100
committerwm4 <wm4@nowhere>2013-12-21 20:50:13 +0100
commit3846fc758789711347c0b11f87736b27fc6210a0 (patch)
treee9b01445291326f0a026e0b002d78f1487d781b2 /sub/sd_srt.c
parent92f9b514263d8becf670c19567826bd288595fe7 (diff)
downloadmpv-3846fc758789711347c0b11f87736b27fc6210a0.tar.bz2
mpv-3846fc758789711347c0b11f87736b27fc6210a0.tar.xz
sub/osd: mp_msg conversions
Diffstat (limited to 'sub/sd_srt.c')
-rw-r--r--sub/sd_srt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sub/sd_srt.c b/sub/sd_srt.c
index c08f927c4a..18ef0cce8f 100644
--- a/sub/sd_srt.c
+++ b/sub/sd_srt.c
@@ -273,7 +273,8 @@ static int read_attr(char **s, struct bstr *attr, struct bstr *val)
return 0;
}
-static void convert_subrip(const char *orig, char *dest, int dest_buffer_size)
+static void convert_subrip(struct sd *sd, const char *orig,
+ char *dest, int dest_buffer_size)
{
/* line is not const to avoid warnings with strtol, etc.
* orig content won't be changed */
@@ -392,8 +393,7 @@ static void convert_subrip(const char *orig, char *dest, int dest_buffer_size)
tag->has_color = true;
} else {
// We didn't find any matching color
- mp_msg(MSGT_SUBREADER, MSGL_WARN,
- "SubRip: unknown font color in subtitle: >%s<\n",
+ MP_WARN(sd, "unknown font color in subtitle: >%s<\n",
orig);
append_text(&new_line, "{\\c}");
}
@@ -406,8 +406,8 @@ static void convert_subrip(const char *orig, char *dest, int dest_buffer_size)
tag->has_face = true;
has_valid_attr = true;
} else
- mp_msg(MSGT_SUBREADER, MSGL_WARN,"SubRip: unrecognized "
- "attribute \"%.*s\" in font tag\n", BSTR_P(attr));
+ MP_WARN(sd, "unrecognized attribute \"%.*s\" in font tag\n",
+ BSTR_P(attr));
}
if (!has_valid_attr || *line != '>') { /* Not valid font tag */
@@ -463,7 +463,7 @@ static void decode(struct sd *sd, struct demux_packet *packet)
{
char dest[SD_MAX_LINE_LEN];
// Assume input buffer is padded with 0
- convert_subrip(packet->buffer, dest, sizeof(dest));
+ convert_subrip(sd, packet->buffer, dest, sizeof(dest));
sd_conv_add_packet(sd, dest, strlen(dest), packet->pts, packet->duration);
}