avcodec/nvenc: refactor dts calculation logic
authorTimo Rothenpieler <timo@rothenpieler.org>
Fri, 1 May 2020 21:42:56 +0000 (23:42 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Fri, 1 May 2020 23:33:49 +0000 (01:33 +0200)
commit9ce7de903882793749abc68eeb29813a19f50de5
tree0ee94b14a8d2e225a0bbb6d32de242ee8e1c4ca7
parentb9746fcbee8f7d73662cefbf8695f1ab47483bac
avcodec/nvenc: refactor dts calculation logic

The old approach used some highly complex delta computation math and
output-delaying.
I do not remember what the initial reasoning behind that was, but given
that we can just offset the dts by the amount of bframes, it seems wholy
unnecessary.

This leaves open an issue with VFR content, for which some more complex
logic might be needed.

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
libavcodec/nvenc.c
libavcodec/nvenc.h