From 8f37a1e8dc93df5530df45a6f6fcf2d8dd3722e0 Mon Sep 17 00:00:00 2001 From: Stefano Sabatini Date: Wed, 17 Oct 2012 10:14:15 +0200 Subject: [PATCH] lavfi/avfiltergraph: avoid to print "(null)" in the scale args Fix parsing. --- libavfilter/avfiltergraph.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 980cdf2877..86be2c4a8c 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -358,7 +358,11 @@ static int query_formats(AVFilterGraph *graph, AVClass *log_ctx) snprintf(inst_name, sizeof(inst_name), "auto-inserted scaler %d", scaler_count++); - snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts); + if (graph->scale_sws_opts) + snprintf(scale_args, sizeof(scale_args), "0:0:%s", graph->scale_sws_opts); + else + snprintf(scale_args, sizeof(scale_args), "0:0"); + if ((ret = avfilter_graph_create_filter(&convert, filter, inst_name, scale_args, NULL, graph)) < 0)