[FFmpeg-cvslog] avcodec/mpegvideo_enc: Use ptrdiff_t for stride

Michael Niedermayer git at videolan.org
Mon Apr 15 01:48:25 EEST 2024


ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Sat Dec 30 03:09:52 2023 +0100| [e166a77c0dc557a7525bf6fe7389952f20939157] | committer: Michael Niedermayer

avcodec/mpegvideo_enc: Use ptrdiff_t for stride

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit e063c1d079086150580ed7a9ad076da122e27f76)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e166a77c0dc557a7525bf6fe7389952f20939157
---

 libavcodec/mpegvideo_enc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index fefae17f30..f23aade61b 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -1201,8 +1201,8 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
                                                  &v_chroma_shift);
 
                 for (i = 0; i < 3; i++) {
-                    int src_stride = pic_arg->linesize[i];
-                    int dst_stride = i ? s->uvlinesize : s->linesize;
+                    ptrdiff_t src_stride = pic_arg->linesize[i];
+                    ptrdiff_t dst_stride = i ? s->uvlinesize : s->linesize;
                     int h_shift = i ? h_chroma_shift : 0;
                     int v_shift = i ? v_chroma_shift : 0;
                     int w = s->width  >> h_shift;



More information about the ffmpeg-cvslog mailing list