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:
@@ -2115,7 +2115,7 @@ static int decode(InputStream *ist, AVCodecContext *avctx,
|
||||
fd = (FrameData*)frame->opaque_ref->data;
|
||||
fd->pts = frame->pts;
|
||||
fd->tb = avctx->pkt_timebase;
|
||||
fd->idx = avctx->frame_number - 1;
|
||||
fd->idx = avctx->frame_num - 1;
|
||||
}
|
||||
|
||||
*got_frame = 1;
|
||||
|
||||
Reference in New Issue
Block a user