Otherwise the flags overwrite anything set by the generic stuff to the flags
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
... | ... |
@@ -356,15 +356,6 @@ static int config_props(AVFilterLink *outlink) |
356 | 356 |
if (!*s) |
357 | 357 |
return AVERROR(ENOMEM); |
358 | 358 |
|
359 |
- if (scale->opts) { |
|
360 |
- AVDictionaryEntry *e = NULL; |
|
361 |
- |
|
362 |
- while ((e = av_dict_get(scale->opts, "", e, AV_DICT_IGNORE_SUFFIX))) { |
|
363 |
- if ((ret = av_opt_set(*s, e->key, e->value, 0)) < 0) |
|
364 |
- return ret; |
|
365 |
- } |
|
366 |
- } |
|
367 |
- |
|
368 | 359 |
av_opt_set_int(*s, "srcw", inlink ->w, 0); |
369 | 360 |
av_opt_set_int(*s, "srch", inlink ->h >> !!i, 0); |
370 | 361 |
av_opt_set_int(*s, "src_format", inlink->format, 0); |
... | ... |
@@ -373,6 +364,13 @@ static int config_props(AVFilterLink *outlink) |
373 | 373 |
av_opt_set_int(*s, "dst_format", outfmt, 0); |
374 | 374 |
av_opt_set_int(*s, "sws_flags", scale->flags, 0); |
375 | 375 |
|
376 |
+ if (scale->opts) { |
|
377 |
+ AVDictionaryEntry *e = NULL; |
|
378 |
+ while ((e = av_dict_get(scale->opts, "", e, AV_DICT_IGNORE_SUFFIX))) { |
|
379 |
+ if ((ret = av_opt_set(*s, e->key, e->value, 0)) < 0) |
|
380 |
+ return ret; |
|
381 |
+ } |
|
382 |
+ } |
|
376 | 383 |
/* Override YUV420P settings to have the correct (MPEG-2) chroma positions |
377 | 384 |
* MPEG-2 chroma positions are used by convention |
378 | 385 |
* XXX: support other 4:2:0 pixel formats */ |