diff options
author | Marton Balint <cus@passwd.hu> | 2023-01-24 00:35:54 +0100 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2023-02-13 00:36:46 +0100 |
commit | 6b6f7db81932f94876ff4bcfd2da0582b8ab897e (patch) | |
tree | 6aaa307f71042d91c6b19736f1cdc6498fd794e5 /libavcodec/vp3.c | |
parent | e506ea3ce1de0c782b2b833398240c8e19a02bb4 (diff) |
avcodec: add AVCodecContext.frame_num as 64 bit variant to frame_number
Frame counters can overflow relatively easily (INT_MAX number of frames is
slightly more than 1 year for 60 fps content), so make sure we use 64 bit
values for them.
Also deprecate the old 32 bit frame_number attribute.
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavcodec/vp3.c')
-rw-r--r-- | libavcodec/vp3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index b731bc0669..9660def675 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -2654,8 +2654,8 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame, s->qps[i] = -1; if (s->avctx->debug & FF_DEBUG_PICT_INFO) - av_log(s->avctx, AV_LOG_INFO, " VP3 %sframe #%d: Q index = %d\n", - s->keyframe ? "key" : "", avctx->frame_number + 1, s->qps[0]); + av_log(s->avctx, AV_LOG_INFO, " VP3 %sframe #%"PRId64": Q index = %d\n", + s->keyframe ? "key" : "", avctx->frame_num + 1, s->qps[0]); s->skip_loop_filter = !s->filter_limit_values[s->qps[0]] || avctx->skip_loop_filter >= (s->keyframe ? AVDISCARD_ALL @@ -2701,7 +2701,7 @@ static int vp3_decode_frame(AVCodecContext *avctx, AVFrame *frame, } #endif s->version = version; - if (avctx->frame_number == 0) + if (avctx->frame_num == 0) av_log(s->avctx, AV_LOG_DEBUG, "VP version: %d\n", s->version); } |