Revision 910b5b82 libavfilter/vf_aspect.c

View differences:

libavfilter/vf_aspect.c
82 82

  
83 83
    av_log(inlink->dst, AV_LOG_INFO, "w:%d h:%d -> dar:%d/%d par:%d/%d\n",
84 84
           inlink->w, inlink->h, dar.num, dar.den, aspect->aspect.num, aspect->aspect.den);
85

  
86
    inlink->sample_aspect_ratio = aspect->aspect;
87

  
85 88
    return 0;
86 89
}
87 90

  
......
108 111
#endif /* CONFIG_SETDAR_FILTER */
109 112

  
110 113
#if CONFIG_SETSAR_FILTER
114
/* for setdar filter, convert from frame aspect ratio to pixel aspect ratio */
115
static int setsar_config_props(AVFilterLink *inlink)
116
{
117
    AspectContext *aspect = inlink->dst->priv;
118

  
119
    inlink->sample_aspect_ratio = aspect->aspect;
120

  
121
    return 0;
122
}
123

  
111 124
AVFilter avfilter_vf_setsar = {
112 125
    .name      = "setsar",
113 126
    .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."),
......
118 131

  
119 132
    .inputs    = (AVFilterPad[]) {{ .name             = "default",
120 133
                                    .type             = AVMEDIA_TYPE_VIDEO,
134
                                    .config_props     = setsar_config_props,
121 135
                                    .get_video_buffer = avfilter_null_get_video_buffer,
122 136
                                    .start_frame      = start_frame,
123 137
                                    .end_frame        = avfilter_null_end_frame },

Also available in: Unified diff