only process lines that start with "[Parsed_blackframe_"
There is no FFmpeg flag to hide metadata such as description In our case, the metadata contained something that matched the regex.
This commit is contained in:
parent
b1e94bd24c
commit
94116b77a5
@ -260,6 +260,10 @@ public static class FFmpegWrapper
|
||||
*/
|
||||
var raw = Encoding.UTF8.GetString(GetOutput(args, cacheKey, true));
|
||||
foreach (var line in raw.Split('\n'))
|
||||
{
|
||||
// There is no FFmpeg flag to hide metadata such as description
|
||||
// In our case, the metadata contained something that matched the regex.
|
||||
if (line.StartsWith("[Parsed_blackframe_", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
var matches = BlackFrameRegex.Matches(line);
|
||||
if (matches.Count != 2)
|
||||
@ -281,6 +285,7 @@ public static class FFmpegWrapper
|
||||
blackFrames.Add(bf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return blackFrames.ToArray();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user