]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/nvenc: Don't set packet duration
authorTimo Rothenpieler <timo@rothenpieler.org>
Sat, 4 Jun 2016 10:20:59 +0000 (12:20 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Sat, 4 Jun 2016 10:20:59 +0000 (12:20 +0200)
It's not expected to be set on video packets and causes issues in
ffmpeg.c.

libavcodec/nvenc.c

index 4be0405113608c9ff4267f43cf8379f2041148b5..d3115f4141c4a4e549386f20a305765405696f70 100644 (file)
@@ -1415,7 +1415,6 @@ static int nvenc_set_timestamp(AVCodecContext *avctx,
     NvencContext *ctx = avctx->priv_data;
 
     pkt->pts = params->outputTimeStamp;
-    pkt->duration = params->outputDuration;
 
     /* generate the first dts by linearly extrapolating the
      * first two pts values to the past */
@@ -1616,7 +1615,6 @@ int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
 
         pic_params.encodePicFlags = 0;
         pic_params.inputTimeStamp = frame->pts;
-        pic_params.inputDuration  = av_frame_get_pkt_duration(frame);
 
         nvenc_codec_specific_pic_params(avctx, &pic_params);
     } else {