[vlc-commits] vlc_bits: fix bo_set_32be

Francois Cartegnie git at videolan.org
Thu Mar 19 18:37:20 CET 2015


vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Thu Mar 19 15:07:05 2015 +0100| [a66b9dce7cd48bbf657c2f0aec1cc5fb3acbb8ea] | committer: Francois Cartegnie

vlc_bits: fix bo_set_32be

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=a66b9dce7cd48bbf657c2f0aec1cc5fb3acbb8ea
---

 include/vlc_bits.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/vlc_bits.h b/include/vlc_bits.h
index 62e03a0..3756e99 100644
--- a/include/vlc_bits.h
+++ b/include/vlc_bits.h
@@ -255,8 +255,8 @@ static inline void bo_add_16le(bo_t *p_bo, uint16_t i)
 
 static inline void bo_set_16be(bo_t *p_bo, int i_offset, uint16_t i)
 {
-    bo_set_8(p_bo, i_offset + 1, ((i >> 8) &0xff));
-    bo_set_8(p_bo, i_offset, i &0xff);
+    bo_set_8(p_bo, i_offset, ((i >> 8) &0xff));
+    bo_set_8(p_bo, i_offset + 1, i &0xff);
 }
 
 static inline void bo_set_16le(bo_t *p_bo, int i_offset, uint16_t i)
@@ -286,8 +286,8 @@ static inline void bo_add_32le(bo_t *p_bo, uint32_t i)
 
 static inline void bo_set_32be(bo_t *p_bo, int i_offset, uint32_t i)
 {
-    bo_set_16be(p_bo, i_offset + 2, ((i >> 16) &0xffff));
-    bo_set_16be(p_bo, i_offset, i &0xffff);
+    bo_set_16be(p_bo, i_offset, ((i >> 16) &0xffff));
+    bo_set_16be(p_bo, i_offset + 2, i &0xffff);
 }
 
 static inline void bo_set_32le(bo_t *p_bo, int i_offset, uint32_t i)



More information about the vlc-commits mailing list