mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-02-04 14:30:55 +08:00
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:
@@ -266,7 +266,12 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
goto free_and_end;
|
||||
}
|
||||
|
||||
avctx->frame_number = 0;
|
||||
avctx->frame_num = 0;
|
||||
#if FF_API_AVCTX_FRAME_NUMBER
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
avctx->frame_number = avctx->frame_num;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
avctx->codec_descriptor = avcodec_descriptor_get(avctx->codec_id);
|
||||
|
||||
if ((avctx->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) &&
|
||||
|
||||
Reference in New Issue
Block a user