Commit c9399538 authored by Stefano Sabatini's avatar Stefano Sabatini

lavfi/ass: use a default DAR value of 1.0

Previously it was using the same value of the input video DAR, which is
inconsistent with most implementations.

Fix trac ticket #1098.
parent e71e65ff
...@@ -134,7 +134,6 @@ static int config_input(AVFilterLink *inlink) ...@@ -134,7 +134,6 @@ static int config_input(AVFilterLink *inlink)
const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format]; const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[inlink->format];
double sar = inlink->sample_aspect_ratio.num ? double sar = inlink->sample_aspect_ratio.num ?
av_q2d(inlink->sample_aspect_ratio) : 1; av_q2d(inlink->sample_aspect_ratio) : 1;
double dar = inlink->w / (double)inlink->h * sar;
av_image_fill_max_pixsteps(ass->pix_step, NULL, pix_desc); av_image_fill_max_pixsteps(ass->pix_step, NULL, pix_desc);
ff_fill_rgba_map(ass->rgba_map, inlink->format); ff_fill_rgba_map(ass->rgba_map, inlink->format);
...@@ -143,7 +142,7 @@ static int config_input(AVFilterLink *inlink) ...@@ -143,7 +142,7 @@ static int config_input(AVFilterLink *inlink)
ass->vsub = pix_desc->log2_chroma_h; ass->vsub = pix_desc->log2_chroma_h;
ass_set_frame_size (ass->renderer, inlink->w, inlink->h); ass_set_frame_size (ass->renderer, inlink->w, inlink->h);
ass_set_aspect_ratio(ass->renderer, dar, sar); ass_set_aspect_ratio(ass->renderer, 1.0, sar);
return 0; return 0;
} }
......
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