]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/cuvid: use pkt_timebase instead of time_base
authorTimo Rothenpieler <timo@rothenpieler.org>
Fri, 9 Sep 2016 14:15:45 +0000 (16:15 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Fri, 9 Sep 2016 15:56:07 +0000 (17:56 +0200)
libavcodec/cuvid.c

index 7cc133107fa8e98595dd5e27f4282a74e2484f94..120b04594598970af7a33a0aedda544955f2175b 100644 (file)
@@ -258,7 +258,7 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
 
         if (avpkt->pts != AV_NOPTS_VALUE) {
             cupkt.flags = CUVID_PKT_TIMESTAMP;
-            cupkt.timestamp = av_rescale_q(avpkt->pts, avctx->time_base, (AVRational){1, 10000000});
+            cupkt.timestamp = av_rescale_q(avpkt->pts, avctx->pkt_timebase, (AVRational){1, 10000000});
         }
     } else {
         cupkt.flags = CUVID_PKT_ENDOFSTREAM;
@@ -363,7 +363,7 @@ static int cuvid_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
 
         frame->width = avctx->width;
         frame->height = avctx->height;
-        frame->pts = av_rescale_q(dispinfo.timestamp, (AVRational){1, 10000000}, avctx->time_base);
+        frame->pts = av_rescale_q(dispinfo.timestamp, (AVRational){1, 10000000}, avctx->pkt_timebase);
 
         /* CUVIDs opaque reordering breaks the internal pkt logic.
          * So set pkt_pts and clear all the other pkt_ fields.