aboutsummaryrefslogtreecommitdiffstats
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:31:41 +0200
commit0699b0836d00dd2b6d7e6161babaea9e2c1bd709 (patch)
tree53bbe271c6a6e86eef830f43c662e3311663bbaf
parentef2efaa78bef4fdd1885d6fbb8968482666f6eb2 (diff)
downloadffmpeg-0699b0836d00dd2b6d7e6161babaea9e2c1bd709.tar.gz
avfilter/scale_npp: fix non-aligned output frame dimensions
-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 8a277ce8e1..86279f5b36 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -472,13 +472,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);