demux_edl: don't assume data follows a comment line

There could be another comment line or the end of the file.

Fixes #6529.
This commit is contained in:
Philip Sequeira 2019-03-02 18:14:57 -05:00 committed by sfan5
parent b9cde8d95c
commit 89eacf8131
1 changed files with 3 additions and 1 deletions

View File

@ -80,8 +80,10 @@ static struct tl_parts *parse_edl(bstr str)
{
struct tl_parts *tl = talloc_zero(NULL, struct tl_parts);
while (str.len) {
if (bstr_eatstart0(&str, "#"))
if (bstr_eatstart0(&str, "#")) {
bstr_split_tok(str, "\n", &(bstr){0}, &str);
continue;
}
if (bstr_eatstart0(&str, "\n") || bstr_eatstart0(&str, ";"))
continue;
bool is_header = bstr_eatstart0(&str, "!");