[haiku-commits] Re: haiku: hrev50400 - src/kits/media src/add-ons/media/plugins/http_streamer headers/private/media

  • From: Jérôme Duval <jerome.duval@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 9 Jul 2016 17:47:23 +0200

2016-07-09 16:30 GMT+02:00  <b.vitruvio@xxxxxxxxx>:

Commit:      0474db50d0de3ff50900db4e80a19a03e54a00bb
URL:         http://cgit.haiku-os.org/haiku/commit/?id=0474db50d0de
diff --git a/src/kits/media/AdapterIO.cpp b/src/kits/media/AdapterIO.cpp
index 1c38ca2..d3ef490 100644
--- a/src/kits/media/AdapterIO.cpp
+++ b/src/kits/media/AdapterIO.cpp
@@ -76,7 +76,12 @@ public:

                bigtime_t totalTimeOut = 0;

-               while(bufferSize <= position) {
+               while(bufferSize < position+size) {
+                       // We are not running, no luck to receive
+                       // more data, let's return and avoid locking.

Coding style: space after while, spaces around the + operator.

Bye,
Jérôme

Other related posts: