mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
sub: sub-filter-regex and jsre: support ass-to-plaintext
Using --sub-filter-regex-plain (default:no) The ass-to-plaintext functionality already existed at sd_ass.c, but it's internal and uses a private buffer type, so a trivial utility wrapper was added with standard char*/bstr interface. The plaintext can be multi-line, and the multi-line regexp flag is now always set, but only affects plaintext (the ASS source is one line).
This commit is contained in:
committed by
avih
parent
7c264950c0
commit
41650203c3
@@ -218,6 +218,7 @@ const struct m_sub_options mp_sub_filter_opts = {
|
||||
{"sub-filter-sdh", OPT_FLAG(sub_filter_SDH)},
|
||||
{"sub-filter-sdh-harder", OPT_FLAG(sub_filter_SDH_harder)},
|
||||
{"sub-filter-regex-enable", OPT_FLAG(rf_enable)},
|
||||
{"sub-filter-regex-plain", OPT_FLAG(rf_plain)},
|
||||
{"sub-filter-regex", OPT_STRINGLIST(rf_items)},
|
||||
{"sub-filter-jsre", OPT_STRINGLIST(jsre_items)},
|
||||
{"sub-filter-regex-warn", OPT_FLAG(rf_warn)},
|
||||
|
||||
@@ -114,6 +114,7 @@ struct mp_sub_filter_opts {
|
||||
int sub_filter_SDH;
|
||||
int sub_filter_SDH_harder;
|
||||
int rf_enable;
|
||||
int rf_plain;
|
||||
char **rf_items;
|
||||
char **jsre_items;
|
||||
int rf_warn;
|
||||
|
||||
Reference in New Issue
Block a user