summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2016-05-31 18:39:28 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2016-05-31 18:39:28 +0200
commit69c25c0ad7e4b6802ed7b6c3ff0a5a45bf8f8492 (patch)
tree62d07044c8b4cde5fa22816d69fb03998aaa3a31 /libavcodec/nvenc.c
parent971351b6642e9beb96db64f1fd627404ce9d72de (diff)
avcodec/nvenc: forward frame duration
Diffstat (limited to 'libavcodec/nvenc.c')
-rw-r--r--libavcodec/nvenc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c
index 409a7b785b..2fdfdcf17b 100644
--- a/libavcodec/nvenc.c
+++ b/libavcodec/nvenc.c
@@ -1418,6 +1418,7 @@ static int nvenc_set_timestamp(AVCodecContext *avctx,
NvencContext *ctx = avctx->priv_data;
pkt->pts = params->outputTimeStamp;
+ pkt->duration = params->outputDuration;
pkt->dts = timestamp_queue_dequeue(ctx->timestamp_list);
/* when there're b frame(s), set dts offset */
@@ -1601,7 +1602,7 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
pic_params.encodePicFlags = 0;
pic_params.inputTimeStamp = frame->pts;
- pic_params.inputDuration = 0;
+ pic_params.inputDuration = av_frame_get_pkt_duration(frame);
nvenc_codec_specific_pic_params(avctx, &pic_params);
} else {