Browse code

avfiltergraph: simplify inserting conversion filters.

There is now no need to explicitly pass 0:0 as width/height to scale,
those are the defaults.

Anton Khirnov authored on 2013/05/14 15:16:37
Showing 1 changed files
... ...
@@ -273,13 +273,9 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx)
273 273
 
274 274
                     snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d",
275 275
                              scaler_count++);
276
-                    av_strlcpy(scale_args, "0:0", sizeof(scale_args));
277
-                    if (graph->scale_sws_opts) {
278
-                        av_strlcat(scale_args, ":", sizeof(scale_args));
279
-                        av_strlcat(scale_args, graph->scale_sws_opts, sizeof(scale_args));
280
-                    }
276
+
281 277
                     if ((ret = avfilter_graph_create_filter(&convert, filter,
282
-                                                            inst_name, scale_args, NULL,
278
+                                                            inst_name, graph->scale_sws_opts, NULL,
283 279
                                                             graph)) < 0)
284 280
                         return ret;
285 281
                     break;