[FFmpeg-cvslog] avcodec/movtextdec: Switch to smaller type

Andreas Rheinhardt git at videolan.org
Sat Dec 11 18:05:14 EET 2021


ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinhardt at outlook.com> | Wed Dec  8 21:08:58 2021 +0100| [cd693c9ec8a83eca7c5e79c454a451c7936749c5] | committer: Andreas Rheinhardt

avcodec/movtextdec: Switch to smaller type

The base size of a box refers to the size the box has in a file,
not in memory; so size_t is not their natural type. Therefore use
a plain unsigned which is smaller on 64bit systems and still big
enough to represent any conceivable base size.

Reviewed-by: Philip Langdale <philipl at overt.org>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>

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

 libavcodec/movtextdec.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c
index b0c54bf1d0..8dd571d64c 100644
--- a/libavcodec/movtextdec.c
+++ b/libavcodec/movtextdec.c
@@ -111,7 +111,7 @@ typedef struct {
 
 typedef struct {
     uint32_t type;
-    size_t base_size;
+    unsigned base_size;
     int (*decode)(const uint8_t *tsmb, MovTextContext *m, const AVPacket *avpkt);
 } Box;
 



More information about the ffmpeg-cvslog mailing list