[vlc-commits] avio: fix busy loop on EOF (fixes #11076)

Rémi Denis-Courmont git at videolan.org
Wed Apr 2 17:37:51 CEST 2014


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr  2 18:37:20 2014 +0300| [01c1d49be8c2b9eb375327c79145fa74e58c2f21] | committer: Rémi Denis-Courmont

avio: fix busy loop on EOF (fixes #11076)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=01c1d49be8c2b9eb375327c79145fa74e58c2f21
---

 modules/access/avio.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/access/avio.c b/modules/access/avio.c
index 9839366..47615e6 100644
--- a/modules/access/avio.c
+++ b/modules/access/avio.c
@@ -307,8 +307,10 @@ static ssize_t Read(access_t *access, uint8_t *data, size_t size)
     int r = avio_read(access->p_sys->context, data, size);
     if (r > 0)
         access->info.i_pos += r;
-    else
+    else {
         access->info.b_eof = true;
+        r = 0;
+    }
     return r;
 }
 



More information about the vlc-commits mailing list