avfilter: fix segfault with setsar/dar

Reported-by: durandal_1707
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-02-20 12:34:05 +01:00
parent f7b46d86de
commit 951d39fecd
1 changed files with 1 additions and 1 deletions

View File

@ -59,7 +59,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args, const AVClass *c
aspect->class = class;
av_opt_set_defaults(aspect);
if (sscanf(args, "%d:%d%c", &q.num, &q.den, &c) == 2) {
if (args && sscanf(args, "%d:%d%c", &q.num, &q.den, &c) == 2) {
aspect->ratio_str = av_strdup(args);
av_log(ctx, AV_LOG_WARNING,
"num:den syntax is deprecated, please use num/den or named options instead\n");