diff options
author | reimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2010-07-10 22:24:31 +0000 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:14:43 +0200 |
commit | d12c624ea8c58be40181cfbd7816f50e9e6c00ce (patch) | |
tree | 2c5706c559e3897f40e7912d72562440c5328a86 /libmpcodecs/vd_realvid.c | |
parent | 1663d97a112261c10f989b70547545048f9e31c3 (diff) | |
download | mpv-d12c624ea8c58be40181cfbd7816f50e9e6c00ce.tar.bz2 mpv-d12c624ea8c58be40181cfbd7816f50e9e6c00ce.tar.xz |
Use AV_RL* macros instead of typecasts where appropriate
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31680 b3059339-0415-0410-9bf9-f77b7e298cf2
100l compialtion fix and use AV_RB32.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31683 b3059339-0415-0410-9bf9-f77b7e298cf2
Current FFmpeg installs intreadwrite.h, but keep using the internal
version for now to keep the possibility of compiling against older
FFmpeg lib versions.
Diffstat (limited to 'libmpcodecs/vd_realvid.c')
-rw-r--r-- | libmpcodecs/vd_realvid.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libmpcodecs/vd_realvid.c b/libmpcodecs/vd_realvid.c index 5f4d7cb8a8..04ac9efba7 100644 --- a/libmpcodecs/vd_realvid.c +++ b/libmpcodecs/vd_realvid.c @@ -26,7 +26,7 @@ #endif #include "mp_msg.h" -#include "mpbswap.h" +#include "ffmpeg_files/intreadwrite.h" #include "path.h" #include "vd_internal.h" @@ -289,9 +289,9 @@ static int init(sh_video_t *sh){ mp_msg(MSGT_DECVIDEO,MSGL_ERR,"realvideo: extradata too small (%u)\n", sh->bih->biSize - sizeof(BITMAPINFOHEADER)); return 0; } - init_data = (struct rv_init_t){11, sh->disp_w, sh->disp_h, 0, 0, be2me_32(((unsigned int*)extrahdr)[0]), 1, be2me_32(((unsigned int*)extrahdr)[1])}; // rv30 + 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",be2me_32(((unsigned int*)extrahdr)[1]),be2me_32(((unsigned int*)extrahdr)[0])); + 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; @@ -327,7 +327,7 @@ static int init(sh_video_t *sh){ 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]}; |