aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2011-10-01 14:42:53 +0200
committerAnton Khirnov <anton@khirnov.net>2011-10-17 10:42:21 +0200
commit85afbb1d00d58812df5d634e946b2fcf653bcd8e (patch)
tree387f3ec6499a674c0eadd10e96e424bf9c89859b /libavutil
parentab2940691ba76e1a9b0ce608db0dfc45021d741e (diff)
downloadffmpeg-85afbb1d00d58812df5d634e946b2fcf653bcd8e.tar.gz
AVOptions: don't segfault on NULL parameter in av_set_options_string()
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/opt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavutil/opt.c b/libavutil/opt.c
index 7c80135f5e..bf63bef2af 100644
--- a/libavutil/opt.c
+++ b/libavutil/opt.c
@@ -696,6 +696,9 @@ int av_set_options_string(void *ctx, const char *opts,
{
int ret, count = 0;
+ if (!opts)
+ return 0;
+
while (*opts) {
if ((ret = parse_key_value_pair(ctx, &opts, key_val_sep, pairs_sep)) < 0)
return ret;