From 32c8359093d1ff4f45ed19518b449b3ac3769d27 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sat, 19 Mar 2016 21:45:24 +0100 Subject: lavc: export the timestamps when decoding in AVFrame.pts Currently it's exported as AVFrame.pkt_pts, which is also the only use for that field. The reason it is done like this is that lavc used to export various codec-specific "timing" information in AVFrame.pts, which is not done anymore. Since it is confusing to the callers to have a separate field which is used only for decoder timestamps and nothing else, deprecate pkt_pts and use just AVFrame.pts everywhere. --- libavcodec/mmaldec.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'libavcodec/mmaldec.c') diff --git a/libavcodec/mmaldec.c b/libavcodec/mmaldec.c index 193df7e07d..69258a2eb6 100644 --- a/libavcodec/mmaldec.c +++ b/libavcodec/mmaldec.c @@ -631,7 +631,12 @@ static int ffmal_copy_frame(AVCodecContext *avctx, AVFrame *frame, avctx->pix_fmt, avctx->width, avctx->height); } - frame->pkt_pts = buffer->pts == MMAL_TIME_UNKNOWN ? AV_NOPTS_VALUE : buffer->pts; + 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: -- cgit v1.2.1