x264.c sscanf( t, "%ux%u", &w, &h )
//x264.c中的代码 psz_filename = argv[optind++]; psz = psz_filename + strlen(psz_filename) - 1; //这儿psz代表后缀“.avi /.avs/.y4m” if( !strncasecmp( psz, ".avi", 4 ) || !strncasecmp( psz, ".avs", 4 ) ) if( !strncasecmp( psz, ".y4m", 4 ) ) b_y4m = 1;
{ //psz这儿重新赋值了,又是完整的文件名了 for( psz = psz_filename; *psz; psz++ ) } |
1 |
测试:
#include "stdafx.h" int main(int argc, char* argv[]) cout<<"w="<<w<<"\n"; return 0; |
参考:
C/C++ char*类型字符串结尾符的问题: