avcodec/nvenc: provide nvenc with monotonic frame index

This commit is contained in:
Timo Rothenpieler 2024-04-01 00:43:23 +02:00
parent c06e9e289f
commit 271a0a55bc
2 changed files with 3 additions and 0 deletions

View File

@ -2784,6 +2784,7 @@ static int nvenc_send_frame(AVCodecContext *avctx, const AVFrame *frame)
pic_params.encodePicFlags = 0;
}
pic_params.frameIdx = ctx->frame_idx_counter++;
pic_params.inputTimeStamp = frame->pts;
if (ctx->extra_sei) {

View File

@ -226,6 +226,8 @@ typedef struct NvencContext
void *nvencoder;
uint32_t frame_idx_counter;
int preset;
int profile;
int level;