[FFmpeg-cvslog] avutil/frame: Remove deprecated AVFrame.pkt_pts field
Andreas Rheinhardt
git at videolan.org
Wed Apr 28 00:16:25 EEST 2021
ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at gmail.com> | Sat Mar 6 20:40:41 2021 +0100| [6e30b35b85b81c802e52a1078ec7a3097e353c6d] | committer: James Almer
avutil/frame: Remove deprecated AVFrame.pkt_pts field
Deprecated in 32c8359093d1ff4f45ed19518b449b3ac3769d27.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
Signed-off-by: James Almer <jamrial at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e30b35b85b81c802e52a1078ec7a3097e353c6d
---
libavcodec/audiotoolboxdec.c | 5 -----
libavcodec/crystalhd.c | 5 -----
libavcodec/cuviddec.c | 5 -----
libavcodec/decode.c | 11 -----------
libavcodec/gifdec.c | 5 -----
libavcodec/libdav1d.c | 5 -----
libavcodec/libopenh264dec.c | 5 -----
libavcodec/mediacodecdec_common.c | 10 ----------
libavcodec/mmaldec.c | 5 -----
libavcodec/qsvdec.c | 5 -----
libavcodec/vp9.c | 5 -----
libavutil/frame.c | 10 ----------
libavutil/frame.h | 9 ---------
libavutil/version.h | 3 ---
14 files changed, 88 deletions(-)
diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c
index bf3e00959f..fa55f58988 100644
--- a/libavcodec/audiotoolboxdec.c
+++ b/libavcodec/audiotoolboxdec.c
@@ -540,11 +540,6 @@ static int ffat_decode(AVCodecContext *avctx, void *data,
*got_frame_ptr = 1;
if (at->last_pts != AV_NOPTS_VALUE) {
frame->pts = at->last_pts;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = at->last_pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
at->last_pts = avpkt->pts;
}
} else if (ret && ret != 1) {
diff --git a/libavcodec/crystalhd.c b/libavcodec/crystalhd.c
index 228803183a..fbfe5e8f62 100644
--- a/libavcodec/crystalhd.c
+++ b/libavcodec/crystalhd.c
@@ -537,11 +537,6 @@ static inline CopyRet copy_frame(AVCodecContext *avctx,
frame->top_field_first = !bottom_first;
frame->pts = pkt_pts;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = pkt_pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pkt_pos = -1;
frame->pkt_duration = 0;
diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c
index ec57afdefe..1e5e3ea9a6 100644
--- a/libavcodec/cuviddec.c
+++ b/libavcodec/cuviddec.c
@@ -614,11 +614,6 @@ static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame)
/* CUVIDs opaque reordering breaks the internal pkt logic.
* So set pkt_pts and clear all the other pkt_ fields.
*/
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = frame->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pkt_pos = -1;
frame->pkt_duration = 0;
frame->pkt_size = -1;
diff --git a/libavcodec/decode.c b/libavcodec/decode.c
index dbc3f0110b..1a7c37043e 100644
--- a/libavcodec/decode.c
+++ b/libavcodec/decode.c
@@ -394,12 +394,6 @@ static inline int decode_simple_internal(AVCodecContext *avctx, AVFrame *frame,
avctx->pkt_timebase);
if(frame->pts!=AV_NOPTS_VALUE)
frame->pts += diff_ts;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- if(frame->pkt_pts!=AV_NOPTS_VALUE)
- frame->pkt_pts += diff_ts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
if(frame->pkt_dts!=AV_NOPTS_VALUE)
frame->pkt_dts += diff_ts;
if (frame->pkt_duration >= diff_ts)
@@ -1504,11 +1498,6 @@ int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
pkt, sizeof(*pkt), NULL);
frame->pts = pkt->pts;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = pkt->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pkt_pos = pkt->pos;
frame->pkt_duration = pkt->duration;
frame->pkt_size = pkt->size;
diff --git a/libavcodec/gifdec.c b/libavcodec/gifdec.c
index 1906a4c738..dffc860bbc 100644
--- a/libavcodec/gifdec.c
+++ b/libavcodec/gifdec.c
@@ -472,11 +472,6 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, A
bytestream2_init(&s->gb, avpkt->data, avpkt->size);
s->frame->pts = avpkt->pts;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- s->frame->pkt_pts = avpkt->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
s->frame->pkt_dts = avpkt->dts;
s->frame->pkt_duration = avpkt->duration;
diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
index 3c2a68b7e0..90c531fb91 100644
--- a/libavcodec/libdav1d.c
+++ b/libavcodec/libdav1d.c
@@ -314,11 +314,6 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
// match timestamps and packet size
frame->pts = p->m.timestamp;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = p->m.timestamp;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pkt_dts = p->m.timestamp;
frame->pkt_pos = p->m.offset;
frame->pkt_size = p->m.size;
diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c
index c7aa7fa19c..832bfc49ef 100644
--- a/libavcodec/libopenh264dec.c
+++ b/libavcodec/libopenh264dec.c
@@ -144,11 +144,6 @@ static int svc_decode_frame(AVCodecContext *avctx, void *data,
avframe->pts = info.uiOutYuvTimeStamp;
avframe->pkt_dts = AV_NOPTS_VALUE;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- avframe->pkt_pts = avpkt->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
#if OPENH264_VER_AT_LEAST(1, 7)
(*s->decoder)->GetOption(s->decoder, DECODER_OPTION_PROFILE, &opt);
avctx->profile = opt;
diff --git a/libavcodec/mediacodecdec_common.c b/libavcodec/mediacodecdec_common.c
index 404ed28227..cb18aed401 100644
--- a/libavcodec/mediacodecdec_common.c
+++ b/libavcodec/mediacodecdec_common.c
@@ -293,11 +293,6 @@ static int mediacodec_wrap_hw_buffer(AVCodecContext *avctx,
} else {
frame->pts = info->presentationTimeUs;
}
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = frame->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pkt_dts = AV_NOPTS_VALUE;
frame->color_range = avctx->color_range;
frame->color_primaries = avctx->color_primaries;
@@ -386,11 +381,6 @@ static int mediacodec_wrap_sw_buffer(AVCodecContext *avctx,
} else {
frame->pts = info->presentationTimeUs;
}
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = frame->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pkt_dts = AV_NOPTS_VALUE;
av_log(avctx, AV_LOG_TRACE,
diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c
index cb15ac072a..db9e4f9589 100644
--- a/libavcodec/mmaldec.c
+++ b/libavcodec/mmaldec.c
@@ -656,11 +656,6 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame,
}
frame->pts = buffer->pts == MMAL_TIME_UNKNOWN ? AV_NOPTS_VALUE : buffer->pts;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = frame->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pkt_dts = AV_NOPTS_VALUE;
done:
diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c
index 5f2e641373..bf843c8ca2 100644
--- a/libavcodec/qsvdec.c
+++ b/libavcodec/qsvdec.c
@@ -544,11 +544,6 @@ static int qsv_decode(AVCodecContext *avctx, QSVContext *q,
outsurf = &out_frame->surface;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = outsurf->Data.TimeStamp;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->pts = outsurf->Data.TimeStamp;
frame->repeat_pict =
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 4659f94ee8..b4b644d509 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -1572,11 +1572,6 @@ static int vp9_decode_frame(AVCodecContext *avctx, void *frame,
if ((ret = av_frame_ref(frame, s->s.refs[ref].f)) < 0)
return ret;
((AVFrame *)frame)->pts = pkt->pts;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- ((AVFrame *)frame)->pkt_pts = pkt->pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
((AVFrame *)frame)->pkt_dts = pkt->dts;
for (i = 0; i < 8; i++) {
if (s->next_refs[i].f->buf[0])
diff --git a/libavutil/frame.c b/libavutil/frame.c
index d69dd38dc4..e29008752c 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -72,11 +72,6 @@ static void get_frame_defaults(AVFrame *frame)
frame->pts =
frame->pkt_dts = AV_NOPTS_VALUE;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- frame->pkt_pts = AV_NOPTS_VALUE;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
frame->best_effort_timestamp = AV_NOPTS_VALUE;
frame->pkt_duration = 0;
frame->pkt_pos = -1;
@@ -292,11 +287,6 @@ static int frame_copy_props(AVFrame *dst, const AVFrame *src, int force_copy)
dst->palette_has_changed = src->palette_has_changed;
dst->sample_rate = src->sample_rate;
dst->opaque = src->opaque;
-#if FF_API_PKT_PTS
-FF_DISABLE_DEPRECATION_WARNINGS
- dst->pkt_pts = src->pkt_pts;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
dst->pkt_dts = src->pkt_dts;
dst->pkt_pos = src->pkt_pos;
dst->pkt_size = src->pkt_size;
diff --git a/libavutil/frame.h b/libavutil/frame.h
index 23396189d9..43345bcdee 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -399,15 +399,6 @@ typedef struct AVFrame {
*/
int64_t pts;
-#if FF_API_PKT_PTS
- /**
- * PTS copied from the AVPacket that was decoded to produce this frame.
- * @deprecated use the pts field instead
- */
- attribute_deprecated
- int64_t pkt_pts;
-#endif
-
/**
* DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used)
* This is also the Presentation time of this AVFrame calculated from
diff --git a/libavutil/version.h b/libavutil/version.h
index 50531e57d7..0235074d8c 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -105,9 +105,6 @@
* @{
*/
-#ifndef FF_API_PKT_PTS
-#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 57)
-#endif
#ifndef FF_API_CRYPTO_SIZE_T
#define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57)
#endif
More information about the ffmpeg-cvslog
mailing list