mirror of https://git.ffmpeg.org/ffmpeg.git
avutil/common: put ERROR statements into separate code blocks in GET_UTF8/16
To be able to safely use more than one statement in ERROR. Signed-off-by: Marton Balint <cus@passwd.hu>
This commit is contained in:
parent
1466bb0bad
commit
d9f5fe4ed7
|
@ -387,11 +387,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
|
||||||
{\
|
{\
|
||||||
uint32_t top = (val & 128) >> 1;\
|
uint32_t top = (val & 128) >> 1;\
|
||||||
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
|
if ((val & 0xc0) == 0x80 || val >= 0xFE)\
|
||||||
ERROR\
|
{ERROR}\
|
||||||
while (val & top) {\
|
while (val & top) {\
|
||||||
unsigned int tmp = (GET_BYTE) - 128;\
|
unsigned int tmp = (GET_BYTE) - 128;\
|
||||||
if(tmp>>6)\
|
if(tmp>>6)\
|
||||||
ERROR\
|
{ERROR}\
|
||||||
val= (val<<6) + tmp;\
|
val= (val<<6) + tmp;\
|
||||||
top <<= 5;\
|
top <<= 5;\
|
||||||
}\
|
}\
|
||||||
|
@ -414,7 +414,7 @@ static av_always_inline av_const int av_parity_c(uint32_t v)
|
||||||
if (hi < 0x800) {\
|
if (hi < 0x800) {\
|
||||||
val = (GET_16BIT) - 0xDC00;\
|
val = (GET_16BIT) - 0xDC00;\
|
||||||
if (val > 0x3FFU || hi > 0x3FFU)\
|
if (val > 0x3FFU || hi > 0x3FFU)\
|
||||||
ERROR\
|
{ERROR}\
|
||||||
val += (hi<<10) + 0x10000;\
|
val += (hi<<10) + 0x10000;\
|
||||||
}\
|
}\
|
||||||
}\
|
}\
|
||||||
|
|
Loading…
Reference in New Issue