mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
vf_aspect: use the name 's' for the pointer to the private context
This is shorter and consistent across filters.
This commit is contained in:
parent
2832ea26f3
commit
b3ea76624a
@ -58,9 +58,9 @@ static av_cold int init(AVFilterContext *ctx)
|
|||||||
|
|
||||||
static int filter_frame(AVFilterLink *link, AVFrame *frame)
|
static int filter_frame(AVFilterLink *link, AVFrame *frame)
|
||||||
{
|
{
|
||||||
AspectContext *aspect = link->dst->priv;
|
AspectContext *s = link->dst->priv;
|
||||||
|
|
||||||
frame->sample_aspect_ratio = aspect->aspect;
|
frame->sample_aspect_ratio = s->aspect;
|
||||||
return ff_filter_frame(link->dst->outputs[0], frame);
|
return ff_filter_frame(link->dst->outputs[0], frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -71,14 +71,14 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
|
|||||||
/* for setdar filter, convert from frame aspect ratio to pixel aspect ratio */
|
/* for setdar filter, convert from frame aspect ratio to pixel aspect ratio */
|
||||||
static int setdar_config_props(AVFilterLink *inlink)
|
static int setdar_config_props(AVFilterLink *inlink)
|
||||||
{
|
{
|
||||||
AspectContext *aspect = inlink->dst->priv;
|
AspectContext *s = inlink->dst->priv;
|
||||||
AVRational dar = aspect->aspect;
|
AVRational dar = s->aspect;
|
||||||
|
|
||||||
if (aspect->aspect.num && aspect->aspect.den) {
|
if (s->aspect.num && s->aspect.den) {
|
||||||
av_reduce(&aspect->aspect.num, &aspect->aspect.den,
|
av_reduce(&s->aspect.num, &s->aspect.den,
|
||||||
aspect->aspect.num * inlink->h,
|
s->aspect.num * inlink->h,
|
||||||
aspect->aspect.den * inlink->w, 100);
|
s->aspect.den * inlink->w, 100);
|
||||||
inlink->sample_aspect_ratio = aspect->aspect;
|
inlink->sample_aspect_ratio = s->aspect;
|
||||||
} else {
|
} else {
|
||||||
inlink->sample_aspect_ratio = (AVRational){ 1, 1 };
|
inlink->sample_aspect_ratio = (AVRational){ 1, 1 };
|
||||||
dar = (AVRational){ inlink->w, inlink->h };
|
dar = (AVRational){ inlink->w, inlink->h };
|
||||||
@ -147,9 +147,9 @@ AVFilter avfilter_vf_setdar = {
|
|||||||
/* for setdar filter, convert from frame aspect ratio to pixel aspect ratio */
|
/* for setdar filter, convert from frame aspect ratio to pixel aspect ratio */
|
||||||
static int setsar_config_props(AVFilterLink *inlink)
|
static int setsar_config_props(AVFilterLink *inlink)
|
||||||
{
|
{
|
||||||
AspectContext *aspect = inlink->dst->priv;
|
AspectContext *s = inlink->dst->priv;
|
||||||
|
|
||||||
inlink->sample_aspect_ratio = aspect->aspect;
|
inlink->sample_aspect_ratio = s->aspect;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user