From 36b21e17a23ca0d6cd7a44c0e4da531951fbb04a Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 18 Jul 2013 10:55:52 +0200 Subject: [PATCH] lavf/concat: Never fail for sample aspect ratio 0:1. Fixes ticket #2456. Reviewed-by: Nicolas George --- libavfilter/avf_concat.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index 45341023fa..a69c9cb109 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -134,10 +134,13 @@ static int config_output(AVFilterLink *outlink) outlink->format = inlink->format; for (seg = 1; seg < cat->nb_segments; seg++) { inlink = ctx->inputs[in_no += ctx->nb_outputs]; + if (!outlink->sample_aspect_ratio.num) + outlink->sample_aspect_ratio = inlink->sample_aspect_ratio; /* possible enhancement: unsafe mode, do not check */ if (outlink->w != inlink->w || outlink->h != inlink->h || - outlink->sample_aspect_ratio.num != inlink->sample_aspect_ratio.num || + outlink->sample_aspect_ratio.num != inlink->sample_aspect_ratio.num && + inlink->sample_aspect_ratio.num || outlink->sample_aspect_ratio.den != inlink->sample_aspect_ratio.den) { av_log(ctx, AV_LOG_ERROR, "Input link %s parameters " "(size %dx%d, SAR %d:%d) do not match the corresponding "