[FFmpeg-cvslog] avfilter/scale_npp: fix non-aligned output frame dimensions

Timo Rothenpieler git at videolan.org
Thu Oct 7 19:22:59 EEST 2021


ffmpeg | branch: release/4.4 | Timo Rothenpieler <timo at rothenpieler.org> | Thu Oct  7 17:41:44 2021 +0200| [c989427c168b95997ef7366a6cef98f4b40acc66] | committer: Timo Rothenpieler

avfilter/scale_npp: fix non-aligned output frame dimensions

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c989427c168b95997ef7366a6cef98f4b40acc66
---

 libavfilter/vf_scale_npp.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index 502ecfda94..34debc3135 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -481,13 +481,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);
 



More information about the ffmpeg-cvslog mailing list