CloseHandle (child_stderr_write);
- while (1) {
+ while (true) {
char buffer[512];
DWORD read;
if (!ReadFile(child_stderr_read, buffer, sizeof(buffer), &read, 0) || read == 0) {
return m;
}
- while (1) {
+ while (true) {
struct mntent* mnt = getmntent (f);
if (!mnt) {
break;
return;
}
- while (1) {
+ while (true) {
int r = av_read_frame (_format_context, &_packet);
if (r < 0) {
return;
/* Run through until we find the first audio (for each stream) and video */
- while (1) {
+ while (true) {
int r = av_read_frame (_format_context, &_packet);
if (r < 0) {
break;
FileGroup::read (uint8_t* buffer, int amount) const
{
int read = 0;
- while (1) {
+ while (true) {
int const this_time = fread (buffer + read, 1, amount - read, _current_file);
read += this_time;
if (read == amount) {
throw DecodeError (N_("could not push buffer into filter chain."));
}
- while (1) {
+ while (true) {
if (av_buffersink_get_frame (_buffer_sink_context, _frame) < 0) {
break;
}
ScopedTemporary temp_cert;
f = temp_cert.open ("wb");
char buffer[4096];
- while (1) {
+ while (true) {
int const N = zip_fread (zip_file, buffer, sizeof (buffer));
fwrite (buffer, 1, N, f);
if (N < int (sizeof (buffer))) {
void
JobManager::scheduler ()
{
- while (1) {
+ while (true) {
bool active_jobs = false;
{
boost::asio::io_service io_service;
tcp::acceptor a (io_service, tcp::endpoint (tcp::v4 (), port));
- while (1) {
+ while (true) {
try {
shared_ptr<tcp::socket> s (new tcp::socket (io_service));
a.accept (*s);
string url;
State state = AWAITING_G;
- while (1) {
+ while (true) {
char data[MAX_LENGTH];
boost::system::error_code error;
size_t len = socket->read_some (boost::asio::buffer (data), error);
int64_t const pass_size = 256;
shared_ptr<AudioBuffers> pass (new AudioBuffers (_channels, 256));
- while (1) {
+ while (true) {
int const frames = swr_convert (_swr_context, (uint8_t **) pass->data(), pass_size, 0, 0);
if (frames < 0) {
void
Server::worker_thread ()
{
- while (1) {
+ while (true) {
boost::mutex::scoped_lock lock (_worker_mutex);
while (_queue.empty ()) {
_empty_condition.wait (lock);
boost::asio::ip::tcp::endpoint (boost::asio::ip::tcp::v4(), Config::instance()->server_port_base ())
);
- while (1) {
+ while (true) {
shared_ptr<Socket> socket (new Socket);
acceptor.accept (socket->socket ());
ServerFinder::listen_thread ()
try
{
- while (1) {
+ while (true) {
shared_ptr<Socket> sock (new Socket (60));
try {
void
UpdateChecker::thread ()
{
- while (1) {
+ while (true) {
boost::mutex::scoped_lock lock (_process_mutex);
while (_to_do == 0) {
_condition.wait (lock);
Writer::thread ()
try
{
- while (1)
+ while (true)
{
boost::mutex::scoped_lock lock (_mutex);
- while (1) {
+ while (true) {
if (_finish || _queued_full_in_memory > _maximum_frames_in_memory || have_sequenced_image_at_queue_head ()) {
/* We've got something to do: go and do it */
++N;
}
- while (1) {
+ while (true) {
shared_ptr<Job> job = _job.lock ();
assert (job);
);
int r;
- while (1) {
+ while (true) {
r = c->ShowModal ();
if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) {
error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open."));
}
int r;
- while (1) {
+ while (true) {
r = c->ShowModal ();
if (r == wxID_OK && c->GetPath() == wxStandardPaths::Get().GetDocumentsDir()) {
error_dialog (this, _("You did not select a folder. Make sure that you select a folder before clicking Open."));
bool keep_going = false;
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "version", no_argument, 0, 'v'},
{ "help", no_argument, 0, 'h'},
}
if (keep_going) {
- while (1) {
+ while (true) {
dcpomatic_sleep (3600);
}
}
boost::filesystem::path output;
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "version", no_argument, 0, 'v'},
{ "help", no_argument, 0, 'h'},
program_name = argv[0];
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "help", no_argument, 0, 'h'},
{ "output", required_argument, 0, 'o'},
bool write_log = false;
int option_index = 0;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "version", no_argument, 0, 'v'},
{ "help", no_argument, 0, 'h'},
string film_dir;
string server_host;
- while (1) {
+ while (true) {
static struct option long_options[] = {
{ "help", no_argument, 0, 'h'},
{ "server", required_argument, 0, 's'},
{
ContentList sel;
long int s = -1;
- while (1) {
+ while (true) {
s = _content->GetNextItem (s, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
if (s == -1) {
break;
void run ()
{
- while (1) {
+ while (true) {
if (finished ()) {
return;
}