]> git.sesse.net Git - ffmpeg/commit
avcodec/nvenc: base timestamps on frameIntervalP
authorMartin Storsjö <martin@martin.st>
Fri, 12 Mar 2021 20:42:02 +0000 (22:42 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Fri, 12 Mar 2021 21:11:39 +0000 (22:11 +0100)
commit30cd7feb2dd497b16edb6d7c09a83eb49f89645d
tree5a66b5284cd20fbc8168f600529cff9a0c53b112
parent6e2db67801c9975fae6f55c40f615d87b9a74a15
avcodec/nvenc: base timestamps on frameIntervalP

If b-frames were enabled implicitly (if max_b_frames wasn't set by
the caller at all, since a0949d0bcb0eee2f3fffcf9a4810c0295d14c0dc),
we wouldn't offset dts at all, producing invalid pts/dts combinations
(causing loud warnings by ffmpeg, or muxer errors if passed without
an extra cleanup pass).

Instead use frameIntervalP for offsetting, which should always be
accurate.

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