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>
This commit is contained in:
Marton Balint
2023-01-24 00:35:54 +01:00
parent e506ea3ce1
commit 6b6f7db819
51 changed files with 146 additions and 96 deletions

View File

@@ -374,7 +374,7 @@ static void cdg_decode_flush(AVCodecContext *avctx)
return;
memset(cc->frame->data[0], 0, cc->frame->linesize[0] * avctx->height);
if (!avctx->frame_number)
if (!avctx->frame_num)
memset(cc->frame->data[1], 0, AVPALETTE_SIZE);
}