avfiltergraph: check for sws opts being non-NULL before using them.
Avoid snprintfing a NULL pointer.
CC: libav-stable@libav.org
(cherry picked from commit 6e3c13a559
)
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
This commit is contained in:

committed by
Reinhard Tartler

parent
f844cb9bce
commit
33c9e18b09
@@ -121,7 +121,8 @@ static int create_filter(AVFilterContext **filt_ctx, AVFilterGraph *ctx, int ind
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags")) {
|
||||
if (!strcmp(filt_name, "scale") && args && !strstr(args, "flags") &&
|
||||
ctx->scale_sws_opts) {
|
||||
snprintf(tmp_args, sizeof(tmp_args), "%s:%s",
|
||||
args, ctx->scale_sws_opts);
|
||||
args = tmp_args;
|
||||
|
Reference in New Issue
Block a user