1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avfilter/scale_npp: fix non-aligned output frame dimensions

This commit is contained in:
Timo Rothenpieler 2021-10-07 17:41:44 +02:00
parent ed084161ba
commit 37745b4904

View File

@ -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);