Browse Source

Currently, the replacement which is used if inet_aton isn't available,

only works correctly on little-endian. The attached patch makes it endian
independent.

Patch by Martin Storsjö <$firstname()$firstname,st>.

Originally committed as revision 21080 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.6
Martin Storsjö Ronald S. Bultje 16 years ago
parent
commit
b827f4eb47
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/os_support.c

+ 1
- 1
libavformat/os_support.c View File

@@ -54,7 +54,7 @@ int inet_aton (const char * str, struct in_addr * add)

if (!add1 || (add1|add2|add3|add4) > 255) return 0;

add->s_addr=(add4<<24)+(add3<<16)+(add2<<8)+add1;
add->s_addr = htonl((add1 << 24) + (add2 << 16) + (add3 << 8) + add4);

return 1;
}


Loading…
Cancel
Save