changeset 31617:91b59ae45d76

100l compialtion fix and use AV_RB32.
author reimar
date Sat, 10 Jul 2010 22:56:58 +0000
parents 3da109629fca
children 9318ad289bb0
files libmpcodecs/vd_realvid.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vd_realvid.c	Sat Jul 10 22:49:28 2010 +0000
+++ b/libmpcodecs/vd_realvid.c	Sat Jul 10 22:56:58 2010 +0000
@@ -27,7 +27,7 @@
 
 #include "mp_msg.h"
 #include "help_mp.h"
-#include "mpbswap.h"
+#include "libavutil/intreadwrite.h"
 #include "path.h"
 
 #include "vd_internal.h"
@@ -272,7 +272,7 @@
 	}
 	init_data = (struct rv_init_t){11, sh->disp_w, sh->disp_h, 0, 0, AV_RB32(extrahdr), 1, AV_RB32(extrahdr + 4)}; // rv30
 
-	mp_msg(MSGT_DECVIDEO,MSGL_V,"realvideo codec id: 0x%08X  sub-id: 0x%08X\n",init_data.format,init_data.sub_format);
+	mp_msg(MSGT_DECVIDEO,MSGL_V,"realvideo codec id: 0x%08X  sub-id: 0x%08X\n",init_data.format,init_data.subformat);
 
 	path = malloc(strlen(codec_path) + strlen(sh->codec->dll) + 2);
 	if (!path) return 0;
@@ -308,7 +308,7 @@
 	    return 0;
 	}
 	// setup rv30 codec (codec sub-type and image dimensions):
-	if((sh->format<=0x30335652) && (be2me_32(((unsigned int*)extrahdr)[1])>=0x20200002)){
+	if((sh->format<=0x30335652) && AV_RB32(extrahdr + 4)>=0x20200002){
 	    int i, cmsg_cnt;
 	    uint32_t cmsg24[16]={sh->disp_w,sh->disp_h};
 	    cmsg_data_t cmsg_data={0x24,1+(extrahdr[1]&7), &cmsg24[0]};
@@ -394,7 +394,7 @@
 	}
 
 	for (i=0; i<2*(chunks+1); i++)
-		extra[i] = le2me_32(extra[i]);
+		extra[i] = le2ne_32(extra[i]);
 
 #ifdef CONFIG_WIN32DLL
 	if (dll_type == 1)