diff options
author | RĂ©mi Denis-Courmont <remi@remlab.net> | 2022-09-19 19:10:42 +0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2022-09-19 13:51:00 -0300 |
commit | bbf045aa592f7bec895907c8878fd734a0e8713b (patch) | |
tree | b0068902d170b57fabbd2abfc0759852ffde047a /libavcodec/vorbisdec.c | |
parent | 129cbbd7be16fc0c396cfbb291794174735dbaf7 (diff) | |
download | ffmpeg-bbf045aa592f7bec895907c8878fd734a0e8713b.tar.gz |
lavc/vorbisdec: use ptrdiff_t to iterate over intptr_t
While this probably never overflows, we are better safe than sorry.
The callback prototype should probably also use ptrdiff_t or size_t,
but I diggress (this would affect the DSP callback prototype).
Diffstat (limited to 'libavcodec/vorbisdec.c')
-rw-r--r-- | libavcodec/vorbisdec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c index 38a5367be3..bfc4be6fc6 100644 --- a/libavcodec/vorbisdec.c +++ b/libavcodec/vorbisdec.c @@ -1581,8 +1581,7 @@ static inline int vorbis_residue_decode(vorbis_context *vc, vorbis_residue *vr, void ff_vorbis_inverse_coupling(float *mag, float *ang, intptr_t blocksize) { - int i; - for (i = 0; i < blocksize; i++) { + for (ptrdiff_t i = 0; i < blocksize; i++) { if (mag[i] > 0.0) { if (ang[i] > 0.0) { ang[i] = mag[i] - ang[i]; |