diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-07-01 13:59:50 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-07-01 13:59:50 +0100 |
| commit | 05654d0e1799746a9df3ccab040c92e0ed825cac (patch) | |
| tree | 59f89a17bf9b9fd9e1056a55653724b616703a2c /src/lib | |
| parent | b63118dafbd7224e9196a40895d9c7cb96504717 (diff) | |
| parent | 6bc83f72f12c8513a1e9e9b6fd880697a73f968f (diff) | |
Merge master.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/cross.cc | 4 | ||||
| -rw-r--r-- | src/lib/ffmpeg_examiner.cc | 2 | ||||
| -rw-r--r-- | src/lib/file_group.cc | 2 | ||||
| -rw-r--r-- | src/lib/filter_graph.cc | 2 | ||||
| -rw-r--r-- | src/lib/internet.cc | 2 | ||||
| -rw-r--r-- | src/lib/job_manager.cc | 2 | ||||
| -rw-r--r-- | src/lib/json_server.cc | 4 | ||||
| -rw-r--r-- | src/lib/resampler.cc | 2 | ||||
| -rw-r--r-- | src/lib/server.cc | 2 | ||||
| -rw-r--r-- | src/lib/server_finder.cc | 2 | ||||
| -rw-r--r-- | src/lib/update.cc | 2 | ||||
| -rw-r--r-- | src/lib/writer.cc | 6 |
12 files changed, 16 insertions, 16 deletions
diff --git a/src/lib/cross.cc b/src/lib/cross.cc index 53ef5723a..0224e461d 100644 --- a/src/lib/cross.cc +++ b/src/lib/cross.cc @@ -202,7 +202,7 @@ run_ffprobe (boost::filesystem::path content, boost::filesystem::path out, share 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) { @@ -247,7 +247,7 @@ mount_info () return m; } - while (1) { + while (true) { struct mntent* mnt = getmntent (f); if (!mnt) { break; diff --git a/src/lib/ffmpeg_examiner.cc b/src/lib/ffmpeg_examiner.cc index d9bcedfc5..949062f5b 100644 --- a/src/lib/ffmpeg_examiner.cc +++ b/src/lib/ffmpeg_examiner.cc @@ -73,7 +73,7 @@ FFmpegExaminer::FFmpegExaminer (shared_ptr<const FFmpegContent> c) * where we should look for subtitles (video and audio are always present, * so they are ok). */ - while (1) { + while (true) { int r = av_read_frame (_format_context, &_packet); if (r < 0) { break; diff --git a/src/lib/file_group.cc b/src/lib/file_group.cc index 54ec8280c..9c8d43204 100644 --- a/src/lib/file_group.cc +++ b/src/lib/file_group.cc @@ -151,7 +151,7 @@ int 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) { diff --git a/src/lib/filter_graph.cc b/src/lib/filter_graph.cc index 5add16d19..8b259a12d 100644 --- a/src/lib/filter_graph.cc +++ b/src/lib/filter_graph.cc @@ -143,7 +143,7 @@ FilterGraph::process (AVFrame* frame) 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; } diff --git a/src/lib/internet.cc b/src/lib/internet.cc index c3f9dce65..99ae5c214 100644 --- a/src/lib/internet.cc +++ b/src/lib/internet.cc @@ -80,7 +80,7 @@ get_from_zip_url (string url, string file, function<void (boost::filesystem::pat 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))) { diff --git a/src/lib/job_manager.cc b/src/lib/job_manager.cc index 056b9f925..2b727b0aa 100644 --- a/src/lib/job_manager.cc +++ b/src/lib/job_manager.cc @@ -106,7 +106,7 @@ JobManager::errors () const void JobManager::scheduler () { - while (1) { + while (true) { bool active_jobs = false; diff --git a/src/lib/json_server.cc b/src/lib/json_server.cc index f4aa292d7..1be3c7d0e 100644 --- a/src/lib/json_server.cc +++ b/src/lib/json_server.cc @@ -58,7 +58,7 @@ try { 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); @@ -80,7 +80,7 @@ JSONServer::handle (shared_ptr<tcp::socket> socket) 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); diff --git a/src/lib/resampler.cc b/src/lib/resampler.cc index 9a81df499..e414436e8 100644 --- a/src/lib/resampler.cc +++ b/src/lib/resampler.cc @@ -89,7 +89,7 @@ Resampler::flush () 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) { diff --git a/src/lib/server.cc b/src/lib/server.cc index fe792e307..9d1925de1 100644 --- a/src/lib/server.cc +++ b/src/lib/server.cc @@ -136,7 +136,7 @@ Server::process (shared_ptr<Socket> socket, struct timeval& after_read, struct t void Server::worker_thread () { - while (1) { + while (true) { boost::mutex::scoped_lock lock (_worker_mutex); while (_queue.empty () && !_terminate) { _empty_condition.wait (lock); diff --git a/src/lib/server_finder.cc b/src/lib/server_finder.cc index de8a3852c..9b0cd0376 100644 --- a/src/lib/server_finder.cc +++ b/src/lib/server_finder.cc @@ -103,7 +103,7 @@ void ServerFinder::listen_thread () try { - while (1) { + while (true) { shared_ptr<Socket> sock (new Socket (60)); try { diff --git a/src/lib/update.cc b/src/lib/update.cc index c7527ee49..44ecbb232 100644 --- a/src/lib/update.cc +++ b/src/lib/update.cc @@ -90,7 +90,7 @@ UpdateChecker::run () void UpdateChecker::thread () { - while (1) { + while (true) { /* Block until there is something to do */ boost::mutex::scoped_lock lock (_process_mutex); while (_to_do == 0) { diff --git a/src/lib/writer.cc b/src/lib/writer.cc index 33817ca6e..489135b84 100644 --- a/src/lib/writer.cc +++ b/src/lib/writer.cc @@ -241,11 +241,11 @@ void 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 */ @@ -530,7 +530,7 @@ Writer::check_existing_picture_mxf () ++N; } - while (1) { + while (true) { shared_ptr<Job> job = _job.lock (); assert (job); |
