[FFmpeg-devel] [Patch] scale_npp : Fix pass through mode

Timo Rothenpieler timo at rothenpieler.org
Mon Aug 14 16:48:08 EEST 2017


Am 14.08.2017 um 15:42 schrieb Yogender Gupta:
>>> Applied with a slightly changed logic to achieve the same with fewer lines.
> 
> I just tested, the modified logic doesn't work as none of the stages are initialized.
> 

True, I mis-read the array name as being identical.

-    ctx->outputs[0]->hw_frames_ctx = av_buffer_ref(s->stages[last_stage
> 0 ? last_stage : 0].frames_ctx);
+    if (last_stage < 0)
+        ctx->outputs[0]->hw_frames_ctx =
av_buffer_ref(ctx->inputs[0]->hw_frames_ctx);
+    else
+        ctx->outputs[0]->hw_frames_ctx =
av_buffer_ref(s->stages[last_stage].frames_ctx);
+

This should be good?


More information about the ffmpeg-devel mailing list