[vlc-commits] hds: fix stream error handling

Rémi Denis-Courmont git at videolan.org
Fri Aug 21 19:14:26 CEST 2015


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Aug 21 19:55:36 2015 +0300| [369d7605af5c6148091816a5256a5d04fc77fdc7] | committer: Rémi Denis-Courmont

hds: fix stream error handling

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

 modules/stream_filter/hds/hds.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/stream_filter/hds/hds.c b/modules/stream_filter/hds/hds.c
index 41362a8..915f2eb 100644
--- a/modules/stream_filter/hds/hds.c
+++ b/modules/stream_filter/hds/hds.c
@@ -831,6 +831,8 @@ static uint8_t* download_chunk( stream_t *s,
 
     int read = stream_Read( download_stream, data,
                             size );
+    if( read < 0 )
+        read = 0;
     chunk->data_len = read;
 
     if( read < size )



More information about the vlc-commits mailing list