summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/frame.c10
-rw-r--r--libavutil/frame.h4
-rw-r--r--libavutil/version.h3
3 files changed, 16 insertions, 1 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 3c74931dca..53e6174223 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -99,8 +99,12 @@ static void get_frame_defaults(AVFrame *frame)
memset(frame, 0, sizeof(*frame));
frame->pts =
- frame->pkt_dts =
+ 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;
@@ -295,7 +299,11 @@ 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 1e2691e663..a19da2f489 100644
--- a/libavutil/frame.h
+++ b/libavutil/frame.h
@@ -267,10 +267,14 @@ 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)
diff --git a/libavutil/version.h b/libavutil/version.h
index 787ba58ac6..8a41ef6fbc 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -132,6 +132,9 @@
#ifndef FF_API_CRC_BIG_TABLE
#define FF_API_CRC_BIG_TABLE (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
+#ifndef FF_API_PKT_PTS
+#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 56)
+#endif
/**