You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-07-06 06:27:36 +02:00
Revert "avcodec/nvenc: fix b-frame DTS behavior with fractional framerates"
This reverts commit 9a245bdf5d
.
This commit basically broke all samples with fractional framerates,
rather than fixing them.
I at this point do not understand the original issue anymore, and I'm
not sure how this slipped my initial testing.
All my test samples must have happened to have a simple timebase.
The actual dts values pretty much always are just a simple chain of
1,2,3,4,5,... Or maybe slightly bigger steps. Each increase by one means
an advance in time by one unit of the timebase.
So a fractional framerate/timebase is already not an issue.
So with this patch applied, the calculation might end up substracting
huge values (1001 is a common one) from the dts, which would be an
offset of that many frames, not of that many fractions of a second.
This broke at least muxing into mp4, if the sample happened to have a
fractional framerate.
I do not thing the original issue this patch tried to fix existed in the
first place, so it can be reverted without further consequences.
This commit is contained in:
@ -2285,11 +2285,10 @@ static int nvenc_set_timestamp(AVCodecContext *avctx,
|
|||||||
if (avctx->codec_descriptor->props & AV_CODEC_PROP_REORDER) {
|
if (avctx->codec_descriptor->props & AV_CODEC_PROP_REORDER) {
|
||||||
FF_DISABLE_DEPRECATION_WARNINGS
|
FF_DISABLE_DEPRECATION_WARNINGS
|
||||||
pkt->dts = dts -
|
pkt->dts = dts -
|
||||||
FFMAX(ctx->encode_config.frameIntervalP - 1, 0)
|
|
||||||
#if FF_API_TICKS_PER_FRAME
|
#if FF_API_TICKS_PER_FRAME
|
||||||
* FFMAX(avctx->ticks_per_frame, 1)
|
FFMAX(avctx->ticks_per_frame, 1) *
|
||||||
#endif
|
#endif
|
||||||
* FFMAX(avctx->time_base.num, 1);
|
FFMAX(ctx->encode_config.frameIntervalP - 1, 0);
|
||||||
FF_ENABLE_DEPRECATION_WARNINGS
|
FF_ENABLE_DEPRECATION_WARNINGS
|
||||||
} else {
|
} else {
|
||||||
pkt->dts = pkt->pts;
|
pkt->dts = pkt->pts;
|
||||||
|
Reference in New Issue
Block a user