mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-01 04:58:47 +00:00
hlsdemux: Make sure to ignore \r in line endings in every case
This commit is contained in:
parent
13997abbf9
commit
65c1faf553
1 changed files with 6 additions and 5 deletions
|
@ -263,12 +263,17 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
|
|||
title = NULL;
|
||||
data += 7;
|
||||
while (TRUE) {
|
||||
gchar *r;
|
||||
|
||||
end = g_utf8_strchr (data, -1, '\n');
|
||||
if (end)
|
||||
*end = '\0';
|
||||
|
||||
r = g_utf8_strchr (data, -1, '\r');
|
||||
if (r)
|
||||
*r = '\0';
|
||||
|
||||
if (data[0] != '#') {
|
||||
gchar *r;
|
||||
|
||||
if (duration <= 0 && list == NULL) {
|
||||
GST_LOG ("%s: got line without EXTINF or EXTSTREAMINF, dropping", data);
|
||||
|
@ -279,10 +284,6 @@ gst_m3u8_update (GstM3U8 * self, gchar * data, gboolean * updated)
|
|||
if (data == NULL)
|
||||
goto next_line;
|
||||
|
||||
r = g_utf8_strchr (data, -1, '\r');
|
||||
if (r)
|
||||
*r = '\0';
|
||||
|
||||
if (list != NULL) {
|
||||
if (g_list_find_custom (self->lists, data,
|
||||
(GCompareFunc) _m3u8_compare_uri)) {
|
||||
|
|
Loading…
Reference in a new issue