From 332802e44386a5bf67bfe80bc1085bb547686330 Mon Sep 17 00:00:00 2001 From: HunterAP Date: Tue, 4 May 2021 04:43:52 -0400 Subject: [PATCH] Merging PR #27 from jocover:master --- nvmpi_dec.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nvmpi_dec.cpp b/nvmpi_dec.cpp index 51278f6..d1ff695 100644 --- a/nvmpi_dec.cpp +++ b/nvmpi_dec.cpp @@ -282,6 +282,9 @@ void *dec_capture_loop_fcn(void *arg){ ctx->frame_size[1]=parm.psize[1]; ctx->frame_linesize[2]=parm.width[2]; ctx->frame_size[2]=parm.psize[2]; + + if (ctx->out_pixfmt==NV_PIX_NV12) + ctx->frame_linesize[1] *= 2; ret=NvBuffer2Raw(ctx->dst_dma_fd,0,parm.width[0],parm.height[0],ctx->bufptr_0[buf_index]);