avcodec/nvenc: set frame buffer format for mapped frames

This commit is contained in:
Timo Rothenpieler 2017-02-10 15:00:21 +01:00
parent 50708f4aa4
commit 8a3fea14ae
1 changed files with 1 additions and 0 deletions

View File

@ -1421,6 +1421,7 @@ static int nvenc_upload_frame(AVCodecContext *avctx, const AVFrame *frame,
ctx->registered_frames[reg_idx].mapped = 1;
nvenc_frame->reg_idx = reg_idx;
nvenc_frame->input_surface = nvenc_frame->in_map.mappedResource;
nvenc_frame->format = nvenc_frame->in_map.mappedBufferFmt;
nvenc_frame->pitch = frame->linesize[0];
return 0;
} else {