mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-31 00:47:44 +00:00
avfiltergraph: check for sws opts being non-NULL before using them.
Avoid snprintfing a NULL pointer. CC: libav-stable@libav.org
This commit is contained in:
parent
817dff578f
commit
6e3c13a559
2 changed files with 8 additions and 2 deletions
|
@ -122,7 +122,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue