Failed to resolve hostname 192: The name does not resolve for the supplied parameters

 

 

ffmpeg打开流时,报错,url打印出来没有问题,但是在ffmpeg中乱码了。

Failed to resolve hostname 192: The name does not resolve for the supplied parameters

初步猜测是html传输url,可能编码格式不一样,导致的乱码。

 

原因:

int byte_url(int cam_id,char* url){

if (avformat_open_input(&pFormatCtx, url, NULL, &options) != 0) {

}

}

char* url做参数会引起乱码,改为std::string好像就好了。

你可能感兴趣的:(视频编解码)