[vlc-commits] httplive: check that we actually don't add empty line to segments
Ilkka Ollakka
git at videolan.org
Wed Jul 6 22:26:12 CEST 2011
vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Wed Jul 6 23:25:48 2011 +0300| [62d4347cd4df10d23784b100ddae9e484e4e1030] | committer: Ilkka Ollakka
httplive: check that we actually don't add empty line to segments
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=62d4347cd4df10d23784b100ddae9e484e4e1030
---
modules/stream_filter/httplive.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/modules/stream_filter/httplive.c b/modules/stream_filter/httplive.c
index 5f07c0d..28e0ba4 100644
--- a/modules/stream_filter/httplive.c
+++ b/modules/stream_filter/httplive.c
@@ -938,7 +938,7 @@ static int parse_M3U8(stream_t *s, vlc_array_t *streams, uint8_t *buffer, const
err = parse_Version(s, hls, line);
else if (strncmp(line, "#EXT-X-ENDLIST", 14) == 0)
err = parse_EndList(s, hls);
- else if (strncmp(line, "#", 1) != 0)
+ else if ((strncmp(line, "#", 1) != 0) && (*line != '\0') )
{
err = parse_AddSegment(s, hls, segment_duration, line);
segment_duration = -1; /* reset duration */
More information about the vlc-commits
mailing list