下面两种读m_width的方式都ok:
class Rtmp_tool {
public:
int m_width= 0;
int nHeight = 0;
AVCodecContext *c;
};
调用:
Rtmp_tool *rtmp_tool =(Rtmp_tool *) vp;
int Rtmp_tool::*aaa = &Rtmp_tool::m_width;
printf("111 %d %d \n", rtmp_tool->m_width, rtmp_tool->*aaa);