Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
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 a3e085764a..f363853432 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -475,13 +475,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);