From 6e046750d8aee9010ac923602c4cd6bc6acda78e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 12 Mar 2004 02:26:01 +0000 Subject: [PATCH] big endian compile fix by ("Ronald S. Bultje" ) Originally committed as revision 2873 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/matroska.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/matroska.c b/libavformat/matroska.c index 7fcc3c91f9..f8942aee4b 100644 --- a/libavformat/matroska.c +++ b/libavformat/matroska.c @@ -624,10 +624,10 @@ ebml_read_float (MatroskaDemuxContext *matroska, if (size == 4) { float f; -#ifdef WORDS_BIGENDIAN - f = * (float *) data; -#else while (size-- > 0) +#ifdef WORDS_BIGENDIAN + ((uint8_t *) &f)[3 - size] = get_byte(pb); +#else ((uint8_t *) &f)[size] = get_byte(pb); #endif @@ -635,10 +635,10 @@ ebml_read_float (MatroskaDemuxContext *matroska, } else { double d; -#ifdef WORDS_BIGENDIAN - d = * (double *) data; -#else while (size-- > 0) +#ifdef WORDS_BIGENDIAN + ((uint8_t *) &d)[7 - size] = get_byte(pb); +#else ((uint8_t *) &d)[size] = get_byte(pb); #endif