diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index bff204d926..e3edd74ab7 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1311,7 +1311,7 @@ static int nvenc_copy_frame(AVCodecContext *avctx, NvencSurface *nv_surface, av_image_copy(dst_data, dst_linesize, (const uint8_t**)frame->data, frame->linesize, frame->format, - nv_surface->width, nv_surface->height); + avctx->width, avctx->height); return 0; }