fixed issue with #EXTINF without titles

in #EXTINF tag, when comma `,` after segment duration immediately follows by `\n` the `title` is not getting populated and is not printed with `writeln!`

The problem is created by the nom 5 conversion, where `take_until_either_and_consume!` macro was replaced with `is_not!` + `take!(1)`. However, in case when `opt!(take_until_either_and_consume!` is used, everything gets way too hairy. I couldn't to expressed that in a fairly elegant manner and instead fixed the data presentation, when a new manifest is produced. While storing `\n` in a form of `title` is a nice hack, I'm also convinced this is a better approach to data handling.
This commit is contained in:
Vadim Getmanshchuk 2020-03-06 21:52:22 -08:00 committed by GitHub
parent 4ed378772b
commit b810687652
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -622,6 +622,8 @@ impl MediaSegment {
if let Some(ref v) = self.title {
writeln!(w, "{}", v)?;
} else {
write!(w, "\n");
}
writeln!(w, "{}", self.uri)