fix bug of detect rtmp, add error code