[FFmpeg-cvslog] r21557 - trunk/libavformat/isom.c
reimar
subversion
Sat Jan 30 22:50:48 CET 2010
Author: reimar
Date: Sat Jan 30 22:50:47 2010
New Revision: 21557
Log:
Simplify conversion to 5-bit ASCII.
Modified:
trunk/libavformat/isom.c
Modified: trunk/libavformat/isom.c
==============================================================================
--- trunk/libavformat/isom.c Sat Jan 30 22:47:13 2010 (r21556)
+++ trunk/libavformat/isom.c Sat Jan 30 22:50:47 2010 (r21557)
@@ -283,13 +283,12 @@ int ff_mov_iso639_to_lang(const char *la
lang = "und";
/* 5bit ascii */
for (i = 0; i < 3; i++) {
- unsigned char c = (unsigned char)lang[i];
- if (c < 0x60)
- return -1;
- if (c > 0x60 + 0x1f)
+ uint8_t c = lang[i];
+ c -= 0x60;
+ if (c > 0x1f)
return -1;
code <<= 5;
- code |= (c - 0x60);
+ code |= c;
}
return code;
}
More information about the ffmpeg-cvslog
mailing list