Commit f96363df authored by Baptiste Coudurier's avatar Baptiste Coudurier

Set graph swscale opts before parsing it, that way opts are available

when auto-adding scalers.

Originally committed as revision 24015 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent ae447836
...@@ -460,6 +460,9 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost) ...@@ -460,6 +460,9 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
avfilter_graph_add_filter(graph, last_filter); avfilter_graph_add_filter(graph, last_filter);
} }
snprintf(args, sizeof(args), "flags=0x%X", (int)av_get_int(sws_opts, "sws_flags", NULL));
graph->scale_sws_opts = av_strdup(args);
if (vfilters) { if (vfilters) {
AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut)); AVFilterInOut *outputs = av_malloc(sizeof(AVFilterInOut));
AVFilterInOut *inputs = av_malloc(sizeof(AVFilterInOut)); AVFilterInOut *inputs = av_malloc(sizeof(AVFilterInOut));
...@@ -482,9 +485,6 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost) ...@@ -482,9 +485,6 @@ static int configure_filters(AVInputStream *ist, AVOutputStream *ost)
return -1; return -1;
} }
snprintf(args, sizeof(args), "flags=0x%X", (int)av_get_int(sws_opts, "sws_flags", NULL));
graph->scale_sws_opts = av_strdup(args);
/* configure all the filter links */ /* configure all the filter links */
if (avfilter_graph_check_validity(graph, NULL)) if (avfilter_graph_check_validity(graph, NULL))
return -1; return -1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment