aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2003-08-08 00:12:18 +0000
committerMike Melanson <mike@multimedia.cx>2003-08-08 00:12:18 +0000
commitc965f94346fb2435de444f3405ac17480ec2d0c2 (patch)
tree84fb2ff822b87631153eda945bf4fc20c769904d /libavcodec
parent638c9d91a0d4604421f56eca6e8ed01d48b75a49 (diff)
downloadffmpeg-c965f94346fb2435de444f3405ac17480ec2d0c2.tar.gz
endian-conscious fix, courtesy of Sebastian Jedruszkiewicz
<elf -at- frogger.rules.pl> Originally committed as revision 2107 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/common.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/common.h b/libavcodec/common.h
index ed1ba4ea04..516522abc9 100644
--- a/libavcodec/common.h
+++ b/libavcodec/common.h
@@ -1045,8 +1045,11 @@ static inline int ff_sqrt(int a)
*/
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))