summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-11-13 20:08:51 +0100
committerwm4 <wm4@nowhere>2013-12-01 19:20:35 +0100
commit64a66364ad82ae2b886a5d2918f92f808304b1c0 (patch)
treea26bb92d468bc27ff45fee88bd842e816571dd01
parent2995bf176d65d05ddf29fb49beace518412c19fb (diff)
downloadmpv-64a66364ad82ae2b886a5d2918f92f808304b1c0.tar.bz2
mpv-64a66364ad82ae2b886a5d2918f92f808304b1c0.tar.xz
m_option: handle audio/filter filters with old option parsing
These use the _oldargs_ hack, which failed in combination with playback resume. Make it work. It would be better to port all filters to new option parsing, but that's obviously too much work, and most filters will probably be deleted and replaced by libavfilter in the long run.
-rw-r--r--mpvcore/m_option.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mpvcore/m_option.c b/mpvcore/m_option.c
index acecd990d7..59ab419f71 100644
--- a/mpvcore/m_option.c
+++ b/mpvcore/m_option.c
@@ -2430,9 +2430,15 @@ static char *print_obj_settings_list(const m_option_t *opt, const void *val)
for (int i = 0; entry->attribs[i * 2 + 0]; i++) {
if (i > 0)
res = talloc_strdup_append(res, ":");
- append_param(&res, entry->attribs[i * 2 + 0]);
- res = talloc_strdup_append(res, "=");
- append_param(&res, entry->attribs[i * 2 + 1]);
+ if (strcmp(entry->attribs[i * 2 + 0], "_oldargs_") == 0) {
+ // Compatibility crap; write just the arg without escaping,
+ // and hope it won't crash and burn.
+ res = talloc_strdup_append(res, entry->attribs[i * 2 + 1]);
+ } else {
+ append_param(&res, entry->attribs[i * 2 + 0]);
+ res = talloc_strdup_append(res, "=");
+ append_param(&res, entry->attribs[i * 2 + 1]);
+ }
}
}
}