summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale_npp.c
diff options
context:
space:
mode:
authorYogender Gupta <ygupta@nvidia.com>2017-08-14 16:11:32 +0530
committerTimo Rothenpieler <timo@rothenpieler.org>2017-08-14 13:56:10 +0200
commit77c5a54192b2bd662bdd6bfe5976707da6b68a35 (patch)
tree54deb9194eee987a991d3ca9f0a96d279e0b3702 /libavfilter/vf_scale_npp.c
parent5859b5b4394d3a0d654b6e821c2ba5e1e7842244 (diff)
avfilter/scale_npp: fix passthrough mode
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
Diffstat (limited to 'libavfilter/vf_scale_npp.c')
-rw-r--r--libavfilter/vf_scale_npp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c
index c36772e800..f64ab956c7 100644
--- a/libavfilter/vf_scale_npp.c
+++ b/libavfilter/vf_scale_npp.c
@@ -320,7 +320,11 @@ static int init_processing_chain(AVFilterContext *ctx, int in_width, int in_heig
}
if (last_stage < 0)
+ {
+ ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(ctx->inputs[0]->hw_frames_ctx);
return 0;
+ }
+
ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(s->stages[last_stage].frames_ctx);
if (!ctx->outputs[0]->hw_frames_ctx)
return AVERROR(ENOMEM);