FFmpeg: Update for the deprecated API in 3.2.x
authorSergey Sharybin <sergey.vfx@gmail.com>
Mon, 6 Mar 2017 09:34:57 +0000 (10:34 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Mon, 6 Mar 2017 09:34:57 +0000 (10:34 +0100)
Should be no functional changes.

intern/ffmpeg/ffmpeg_compat.h

index bcfa24b06a8439bc706048252449fcc5aaabb4a9..d6220ebf562f420f826c0fe32271f56c3f5d3c1c 100644 (file)
@@ -350,7 +350,12 @@ int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
 FFMPEG_INLINE
 int64_t av_get_pts_from_frame(AVFormatContext *avctx, AVFrame * picture)
 {
-       int64_t pts = picture->pkt_pts;
+       int64_t pts;
+#if LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(55, 34, 100)
+       pts = picture->pts;
+#else
+       pts = picture->pkt_pts;
+#endif
 
        if (pts == AV_NOPTS_VALUE) {
                pts = picture->pkt_dts;