aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_pullup.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-07 00:09:10 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-12 09:42:27 +0200
commit423b6a7e493828dd91d5e590e0905236f1f46557 (patch)
tree2bdbe0020ba7ecab45e3f0909a7f3d862520a6c7 /libavfilter/vf_pullup.c
parent5094d1f429e58a67c542f1c5940a3de5184c35ca (diff)
downloadffmpeg-423b6a7e493828dd91d5e590e0905236f1f46557.tar.gz
avutil/imgutils: Add wrapper for av_image_copy() to avoid casts
av_image_copy() accepts const uint8_t* const * as source; lots of user have uint8_t* const * and therefore either cast (the majority) or copy the array of pointers. This commit changes this by adding a static inline wrapper for av_image_copy() that casts between the two types so that we do not need to add casts everywhere else. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_pullup.c')
-rw-r--r--libavfilter/vf_pullup.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavfilter/vf_pullup.c b/libavfilter/vf_pullup.c
index 7245684085..14beb972c5 100644
--- a/libavfilter/vf_pullup.c
+++ b/libavfilter/vf_pullup.c
@@ -666,9 +666,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
goto end;
}
- av_image_copy(b->planes, s->planewidth,
- (const uint8_t**)in->data, in->linesize,
- inlink->format, inlink->w, inlink->h);
+ av_image_copy2(b->planes, s->planewidth,
+ in->data, in->linesize,
+ inlink->format, inlink->w, inlink->h);
p = (in->flags & AV_FRAME_FLAG_INTERLACED) ?
!(in->flags & AV_FRAME_FLAG_TOP_FIELD_FIRST) : 0;
@@ -714,9 +714,9 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
}
av_frame_copy_props(out, in);
- av_image_copy(out->data, out->linesize,
- (const uint8_t**)f->buffer->planes, s->planewidth,
- inlink->format, inlink->w, inlink->h);
+ av_image_copy2(out->data, out->linesize,
+ f->buffer->planes, s->planewidth,
+ inlink->format, inlink->w, inlink->h);
ret = ff_filter_frame(outlink, out);
pullup_release_frame(f);