summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale_npp.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2021-10-07 17:41:44 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2021-10-07 18:07:53 +0200
commit37745b49049d4dbb5aa4ea84bcc289ed511971f9 (patch)
tree0ac270fe545eaf78b16662ec723ef40742af6a44 /libavfilter/vf_scale_npp.c
parented084161baaa056545d8c5d9d27feac254081f93 (diff)
avfilter/scale_npp: fix non-aligned output frame dimensions
Diffstat (limited to 'libavfilter/vf_scale_npp.c')
-rw-r--r--libavfilter/vf_scale_npp.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 4d056d6afa..8da335154c 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -471,13 +471,16 @@ static int nppscale_scale(AVFilterContext *ctx, AVFrame *out, AVFrame *in)
src = s->stages[i].frame;
last_stage = i;
}
-
if (last_stage < 0)
return AVERROR_BUG;
+
ret = av_hwframe_get_buffer(src->hw_frames_ctx, s->tmp_frame, 0);
if (ret < 0)
return ret;
+ s->tmp_frame->width = src->width;
+ s->tmp_frame->height = src->height;
+
av_frame_move_ref(out, src);
av_frame_move_ref(src, s->tmp_frame);