]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_aspect.c
avfilter: Constify all AVFilters
[ffmpeg] / libavfilter / vf_aspect.c
index c042698ef7acc5cd3d7f72a2b38f2219e622431f..f0467b5247fbf23ce7268616e55aed3188ccb3e9 100644 (file)
@@ -78,7 +78,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
 static inline void compute_dar(AVRational *dar, AVRational sar, int w, int h)
 {
     if (sar.num && sar.den) {
-        av_reduce(&dar->num, &dar->den, sar.num * w, sar.den * h, INT_MAX);
+        av_reduce(&dar->num, &dar->den, sar.num * (int64_t)w, sar.den * (int64_t)h, INT_MAX);
     } else {
         av_reduce(&dar->num, &dar->den, w, h, INT_MAX);
     }
@@ -185,7 +185,7 @@ static const AVFilterPad avfilter_vf_setdar_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_setdar = {
+const AVFilter ff_vf_setdar = {
     .name        = "setdar",
     .description = NULL_IF_CONFIG_SMALL("Set the frame display aspect ratio."),
     .priv_size   = sizeof(AspectContext),
@@ -249,7 +249,7 @@ static const AVFilterPad avfilter_vf_setsar_outputs[] = {
     { NULL }
 };
 
-AVFilter ff_vf_setsar = {
+const AVFilter ff_vf_setsar = {
     .name        = "setsar",
     .description = NULL_IF_CONFIG_SMALL("Set the pixel sample aspect ratio."),
     .priv_size   = sizeof(AspectContext),