changeset 23627:980d734e102b

Use AV_RL32
author reimar
date Sun, 24 Jun 2007 13:20:17 +0000
parents 53cc0856f3fe
children d4f96ae7081c
files libmpdemux/demux_audio.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demux_audio.c	Sun Jun 24 13:09:08 2007 +0000
+++ b/libmpdemux/demux_audio.c	Sun Jun 24 13:20:17 2007 +0000
@@ -10,6 +10,7 @@
 #include "stheader.h"
 #include "genres.h"
 #include "mp3_hdr.h"
+#include "libavutil/intreadwrite.h"
 
 #include <string.h>
 #ifdef MP_DEBUG
@@ -219,18 +220,18 @@
       if (stream_read (s, comments, blk_len) == blk_len)
       {
         uint8_t *p = ptr;
-        length = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
+        length = AV_RL32(p);
         ptr += 4 + length;
 
         p = ptr;
-        comment_list_len = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
+        comment_list_len = AV_RL32(p);
         ptr += 4;
 
         cn = 0;
         for (; cn < comment_list_len; cn++)
         {
           p = ptr;
-          length = p[0] + (p[1] << 8) + (p[2] << 16) + (p[3] << 24);
+          length = AV_RL32(p);
           ptr += 4;
 
           comment = (char *) ptr;