mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-12-23 19:31:44 +00:00
More verbose warning: tell the user what exactly is wrong with an entry. Empty "text" fields are nothing to worry about. split() actually discards an empty field at the end of a string.
This commit is contained in:
parent
aa5c973cb1
commit
31ec52a844
@ -205,16 +205,20 @@ xtr_ssa_c::handle_block(KaxBlock &block,
|
||||
// 0: ReadOrder, 1: Layer, 2: Style, 3: Name, 4: MarginL, 5: MarginR,
|
||||
// 6: MarginV, 7: Effect, 8: Text
|
||||
fields = split(s, ",", 9);
|
||||
if (9 != fields.size()) {
|
||||
mxwarn("Invalid format for a SSA line ('%s'). This entry will be "
|
||||
"skipped.\n", s);
|
||||
if (9 < fields.size()) {
|
||||
mxwarn("Invalid format for a SSA line ('%s') at timecode " FMT_TIMECODE
|
||||
": Too many fields found (%d instead of 9). This entry will be "
|
||||
"skipped.\n", s, ARG_TIMECODE_NS(timecode), fields.size());
|
||||
return;
|
||||
}
|
||||
while (9 != fields.size())
|
||||
fields.push_back("");
|
||||
|
||||
// Convert the ReadOrder entry so that we can re-order the entries later.
|
||||
if (!parse_int(fields[0], num)) {
|
||||
mxwarn("Invalid format for a SSA line ('%s'). This entry will be "
|
||||
"skipped.\n", s);
|
||||
mxwarn("Invalid format for a SSA line ('%s') at timecode " FMT_TIMECODE
|
||||
": The first field is not an integer. This entry will be "
|
||||
"skipped.\n", s, ARG_TIMECODE_NS(timecode));
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user