[vlc-commits] input/stream: make stream_ReadLine work with block-based streams

Filip Roséen git at videolan.org
Mon Jul 25 22:11:21 CEST 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Jul 22 03:00:53 2016 +0200| [fd3e08b35fba32bfcc2982d7def92e7f3c8b7426] | committer: Jean-Baptiste Kempf

input/stream: make stream_ReadLine work with block-based streams

The if-statement in question prevents stream_ReadLine to work if invoked
with a block-based stream, as such the condition has now been altered to
only return immediately if the source stream does not have neither of
pf_read and pf_block.

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

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

 src/input/stream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input/stream.c b/src/input/stream.c
index d12f8d9..6c614f8 100644
--- a/src/input/stream.c
+++ b/src/input/stream.c
@@ -147,7 +147,7 @@ char *vlc_stream_ReadLine( stream_t *s )
     int i_line = 0, i_read = 0;
 
     /* Let's fail quickly if this is a readdir access */
-    if( s->pf_read == NULL )
+    if( s->pf_read == NULL && s->pf_block == NULL )
         return NULL;
 
     for( ;; )



More information about the vlc-commits mailing list