aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/avpacket.c
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-29 15:14:59 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-29 15:22:52 +0200
commitb01891a9f08b9d271d75d179b3138242a958ee04 (patch)
tree6180f466be7e17e8059b3ab69a1fb5d95e776e32 /libavcodec/avpacket.c
parentd3e5fbb1406995e07fccbff3ca8c1e24f57a1f7b (diff)
parent948f3c19a8bd069768ca411212aaf8c1ed96b10d (diff)
downloadffmpeg-b01891a9f08b9d271d75d179b3138242a958ee04.tar.gz
Merge commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d'
* commit '948f3c19a8bd069768ca411212aaf8c1ed96b10d': lavc: Make AVPacket.duration int64, and deprecate convergence_duration Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/avpacket.c')
-rw-r--r--libavcodec/avpacket.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libavcodec/avpacket.c b/libavcodec/avpacket.c
index 32fa51f24f..0496254cf4 100644
--- a/libavcodec/avpacket.c
+++ b/libavcodec/avpacket.c
@@ -36,7 +36,11 @@ void av_init_packet(AVPacket *pkt)
pkt->dts = AV_NOPTS_VALUE;
pkt->pos = -1;
pkt->duration = 0;
+#if FF_API_CONVERGENCE_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
pkt->convergence_duration = 0;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
pkt->flags = 0;
pkt->stream_index = 0;
pkt->buf = NULL;
@@ -468,7 +472,11 @@ int av_packet_copy_props(AVPacket *dst, const AVPacket *src)
dst->dts = src->dts;
dst->pos = src->pos;
dst->duration = src->duration;
+#if FF_API_CONVERGENCE_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
dst->convergence_duration = src->convergence_duration;
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
dst->flags = src->flags;
dst->stream_index = src->stream_index;
@@ -540,8 +548,12 @@ void av_packet_rescale_ts(AVPacket *pkt, AVRational src_tb, AVRational dst_tb)
pkt->dts = av_rescale_q(pkt->dts, src_tb, dst_tb);
if (pkt->duration > 0)
pkt->duration = av_rescale_q(pkt->duration, src_tb, dst_tb);
+#if FF_API_CONVERGENCE_DURATION
+FF_DISABLE_DEPRECATION_WARNINGS
if (pkt->convergence_duration > 0)
pkt->convergence_duration = av_rescale_q(pkt->convergence_duration, src_tb, dst_tb);
+FF_ENABLE_DEPRECATION_WARNINGS
+#endif
}
int ff_side_data_set_encoder_stats(AVPacket *pkt, int quality, int64_t *error, int error_count, int pict_type)