lavf/concat: Never fail for sample aspect ratio 0:1.

Fixes ticket #2456.

Reviewed-by: Nicolas George
This commit is contained in:
Carl Eugen Hoyos 2013-07-18 10:55:52 +02:00
parent 42272e86fe
commit 36b21e17a2
1 changed files with 4 additions and 1 deletions

View File

@ -134,10 +134,13 @@ static int config_output(AVFilterLink *outlink)
outlink->format = inlink->format; outlink->format = inlink->format;
for (seg = 1; seg < cat->nb_segments; seg++) { for (seg = 1; seg < cat->nb_segments; seg++) {
inlink = ctx->inputs[in_no += ctx->nb_outputs]; 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 */ /* possible enhancement: unsafe mode, do not check */
if (outlink->w != inlink->w || if (outlink->w != inlink->w ||
outlink->h != inlink->h || 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) { outlink->sample_aspect_ratio.den != inlink->sample_aspect_ratio.den) {
av_log(ctx, AV_LOG_ERROR, "Input link %s parameters " av_log(ctx, AV_LOG_ERROR, "Input link %s parameters "
"(size %dx%d, SAR %d:%d) do not match the corresponding " "(size %dx%d, SAR %d:%d) do not match the corresponding "