summaryrefslogtreecommitdiff
path: root/libavcodec/interplayvideo.c
diff options
context:
space:
mode:
authorMarton Balint <cus@passwd.hu>2023-01-24 00:35:54 +0100
committerMarton Balint <cus@passwd.hu>2023-02-13 00:36:46 +0100
commit6b6f7db81932f94876ff4bcfd2da0582b8ab897e (patch)
tree6aaa307f71042d91c6b19736f1cdc6498fd794e5 /libavcodec/interplayvideo.c
parente506ea3ce1de0c782b2b833398240c8e19a02bb4 (diff)
downloadffmpeg-6b6f7db81932f94876ff4bcfd2da0582b8ab897e.tar.gz
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/interplayvideo.c')
-rw-r--r--libavcodec/interplayvideo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/interplayvideo.c b/libavcodec/interplayvideo.c
index 655326a7f1..1a3461bf10 100644
--- a/libavcodec/interplayvideo.c
+++ b/libavcodec/interplayvideo.c
@@ -926,7 +926,7 @@ static void ipvideo_format_06_firstpass(IpvideoContext *s, AVFrame *frame, int16
}
} else {
/* Don't try to copy second_last_frame data on the first frames */
- if (s->avctx->frame_number > 2)
+ if (s->avctx->frame_num > 2)
copy_from(s, s->second_last_frame, frame, 0, 0);
}
}
@@ -1085,7 +1085,7 @@ static void ipvideo_decode_format_10_opcodes(IpvideoContext *s, AVFrame *frame)
copy_from(s, s->cur_decode_frame, frame, 0, 0);
} else {
/* Don't try to copy last_frame data on the first frame */
- if (s->avctx->frame_number)
+ if (s->avctx->frame_num)
copy_from(s, s->last_frame, frame, 0, 0);
}
skip *= 2;
@@ -1144,8 +1144,8 @@ static void ipvideo_decode_format_11_opcodes(IpvideoContext *s, AVFrame *frame)
ret = ipvideo_decode_block16[opcode](s, frame);
}
if (ret != 0) {
- av_log(s->avctx, AV_LOG_ERROR, "decode problem on frame %d, @ block (%d, %d)\n",
- s->avctx->frame_number, x, y);
+ av_log(s->avctx, AV_LOG_ERROR, "decode problem on frame %"PRId64", @ block (%d, %d)\n",
+ s->avctx->frame_num, x, y);
return;
}
}