[FFmpeg-cvslog] avutil/common: use unsigned int in GET_UTF8

Marton Balint git at videolan.org
Fri Jan 31 01:24:52 EET 2020


ffmpeg | branch: master | Marton Balint <cus at passwd.hu> | Wed Jan 29 22:40:42 2020 +0100| [5df1c1ad9adb8ebc8795c756edcbd2923b09a225] | committer: Marton Balint

avutil/common: use unsigned int in GET_UTF8

Right shift of signed value is implementation defined.

Signed-off-by: Marton Balint <cus at passwd.hu>

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

 libavutil/common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/common.h b/libavutil/common.h
index f09f0b486b..5568754bb9 100644
--- a/libavutil/common.h
+++ b/libavutil/common.h
@@ -389,7 +389,7 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
         if ((val & 0xc0) == 0x80 || val >= 0xFE)\
             ERROR\
         while (val & top) {\
-            int tmp= (GET_BYTE) - 128;\
+            unsigned int tmp = (GET_BYTE) - 128;\
             if(tmp>>6)\
                 ERROR\
             val= (val<<6) + tmp;\



More information about the ffmpeg-cvslog mailing list