Mercurial > libavcodec.hg
changeset 1398:d413f9a20214 libavcodec
endian-conscious fix, courtesy of Sebastian Jedruszkiewicz
<elf -at- frogger.rules.pl>
author | tmmm |
---|---|
date | Fri, 08 Aug 2003 00:12:18 +0000 |
parents | 2e43c9bdc982 |
children | 08f82699fc71 |
files | common.h |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/common.h Tue Aug 05 14:08:28 2003 +0000 +++ b/common.h Fri Aug 08 00:12:18 2003 +0000 @@ -1045,8 +1045,11 @@ */ static inline int ff_get_fourcc(const char *s){ assert( strlen(s)==4 ); - +#ifndef WORDS_BIGENDIAN return (s[0]) + (s[1]<<8) + (s[2]<<16) + (s[3]<<24); +#else + return (s[3]) + (s[2]<<8) + (s[1]<<16) + (s[0]<<24); +#endif } #define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24))