Browse Source

avcodec/nvenc: offset dts to account for b-frame reordering

Fixes ticket #7303

Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
tags/n4.2.3
Timo Rothenpieler 5 years ago
parent
commit
a59b535af4
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavcodec/nvenc.c

+ 3
- 2
libavcodec/nvenc.c View File

@@ -1783,10 +1783,11 @@ static int nvenc_set_timestamp(AVCodecContext *avctx,
pkt->dts = ts0 - delta;

ctx->first_packet_output = 1;
return 0;
} else {
pkt->dts = timestamp_queue_dequeue(ctx->timestamp_list);
}

pkt->dts = timestamp_queue_dequeue(ctx->timestamp_list);
pkt->dts -= avctx->max_b_frames;

return 0;
}


Loading…
Cancel
Save