mplayer 5.0 编译错误

博客指出C++最新版本改动大,致使部分平台编译出错,如出现对齐错误问题,同时给出了参考补丁文件1和参考补丁文件2。
  • 由于最新版本改动比较大,导致部分平台编译出错,比如对齐错误
./m_config.h:48:3: error: requested alignment is not an integer constant
In file included from libmpdemux/aviheader.h:26:0,
                 from libmpdemux/stheader.h:23,
                 from command.c:31:

  • 参考补丁文件1
Index: MPlayer-1.5/m_config.h
===================================================================
--- MPlayer-1.5.orig/m_config.h
+++ MPlayer-1.5/m_config.h
@@ -45,7 +45,7 @@ struct m_config_save_slot {
   int lvl;
   // We have to store other datatypes in this as well,
   // so make sure we get properly aligned addresses.
-  DECLARE_ALIGNED(8, unsigned char, data)[0];
+  unsigned char data[0];
 };
 
 /// Config option
  • 参考补丁文件2
Index: MPlayer-1.5/libmpcodecs/vf_ow.c
===================================================================
--- MPlayer-1.5.orig/libmpcodecs/vf_ow.c
+++ MPlayer-1.5/libmpcodecs/vf_ow.c
@@ -39,7 +39,7 @@
 #include "vf.h"
 
 //===========================================================================//
-DECLARE_ALIGNED(8, static const uint8_t, dither)[8][8]={
+static const uint8_t dither[8][8]={
 {  0,  48,  12,  60,   3,  51,  15,  63, },
 { 32,  16,  44,  28,  35,  19,  47,  31, },
 {  8,  56,   4,  52,  11,  59,   7,  55, },
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值