changeset 381:7be99ba54f0f libavformat

big endian compile fix by ("Ronald S. Bultje" <R dot S dot Bultje at students dot uu dot nl>)
author michael
date Fri, 12 Mar 2004 02:26:01 +0000
parents 9416dc106e06
children 37a29b5200d8
files matroska.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/matroska.c	Thu Mar 11 16:26:42 2004 +0000
+++ b/matroska.c	Fri Mar 12 02:26:01 2004 +0000
@@ -624,10 +624,10 @@
     if (size == 4) {
         float f;
 
+        while (size-- > 0)
 #ifdef WORDS_BIGENDIAN
-        f = * (float *) data;
+            ((uint8_t *) &f)[3 - size] = get_byte(pb);
 #else
-        while (size-- > 0)
             ((uint8_t *) &f)[size] = get_byte(pb);
 #endif
 
@@ -635,10 +635,10 @@
     } else {
         double d;
 
+        while (size-- > 0)
 #ifdef WORDS_BIGENDIAN
-        d = * (double *) data;
+            ((uint8_t *) &d)[7 - size] = get_byte(pb);
 #else
-        while (size-- > 0)
             ((uint8_t *) &d)[size] = get_byte(pb);
 #endif