fix extension is not png lost path

Former-commit-id: c063043271
This commit is contained in:
赵宁 2022-10-11 13:50:29 +08:00 committed by Malte Rosenbjerg
parent 1c5d7d26cb
commit d4fdd646fe

View file

@ -361,7 +361,7 @@ private static void ParsePartOfCodecs(Dictionary<string, Codec> codecs, string a
processArguments.OutputDataReceived += (e, data) => processArguments.OutputDataReceived += (e, data) =>
{ {
var codec = parser(data); var codec = parser(data);
if(codec != null) if (codec != null)
if (codecs.TryGetValue(codec.Name, out var parentCodec)) if (codecs.TryGetValue(codec.Name, out var parentCodec))
parentCodec.Merge(codec); parentCodec.Merge(codec);
else else
@ -408,7 +408,7 @@ public static IReadOnlyList<Codec> GetCodecs(CodecType type)
{ {
if (!GlobalFFOptions.Current.UseCache) if (!GlobalFFOptions.Current.UseCache)
return GetCodecsInternal().Values.Where(x => x.Type == type).ToList().AsReadOnly(); return GetCodecsInternal().Values.Where(x => x.Type == type).ToList().AsReadOnly();
return FFMpegCache.Codecs.Values.Where(x=>x.Type == type).ToList().AsReadOnly(); return FFMpegCache.Codecs.Values.Where(x => x.Type == type).ToList().AsReadOnly();
} }
public static IReadOnlyList<Codec> GetVideoCodecs() => GetCodecs(CodecType.Video); public static IReadOnlyList<Codec> GetVideoCodecs() => GetCodecs(CodecType.Video);