[FFmpeg-cvslog] avfilter/scale_npp: fix passthrough mode

Yogender Gupta git at videolan.org
Mon Aug 14 15:09:20 EEST 2017


ffmpeg | branch: master | Yogender Gupta <ygupta at nvidia.com> | Mon Aug 14 16:29:32 2017 +0530| [77c5a54192b2bd662bdd6bfe5976707da6b68a35] | committer: Timo Rothenpieler

avfilter/scale_npp: fix passthrough mode

Signed-off-by: Timo Rothenpieler <timo at rothenpieler.org>

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

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

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



More information about the ffmpeg-cvslog mailing list