Skip to content

Commit

Permalink
obs-ffmpeg: Disable NVENC DTS adjustment for AV1
Browse files Browse the repository at this point in the history
  • Loading branch information
palana authored and RytoEX committed Jul 30, 2024
1 parent 1aa4bd9 commit e7bf19d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions plugins/obs-ffmpeg/obs-nvenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1980,8 +1980,9 @@ static bool nvenc_encode_shared(struct nvenc_data *enc, struct nv_bitstream *bs,
int64_t dts;
deque_pop_front(&enc->dts_list, &dts, sizeof(dts));

/* subtract bframe delay from dts */
dts -= (int64_t)enc->bframes * packet->timebase_num;
/* subtract bframe delay from dts for H.264 and HEVC */
if (enc->codec != CODEC_AV1)
dts -= (int64_t)enc->bframes * packet->timebase_num;

*received_packet = true;
packet->data = enc->packet_data.array;
Expand Down

0 comments on commit e7bf19d

Please sign in to comment.