Fix tags container null ref exception

This commit is contained in:
Malte Rosenbjerg 2023-10-05 08:58:50 +02:00
parent 6df9495e9f
commit b31c8da7ae
3 changed files with 5 additions and 5 deletions

View file

@ -87,7 +87,7 @@ public class FFProbeStream : ITagsContainer, IDispositionContainer
public Dictionary<string, int> Disposition { get; set; } = null!;
[JsonPropertyName("tags")]
public Dictionary<string, string> Tags { get; set; } = null!;
public Dictionary<string, string>? Tags { get; set; }
[JsonPropertyName("side_data_list")]
public List<Dictionary<string, JsonValue>> SideData { get; set; } = null!;
@ -126,7 +126,7 @@ public class Format : ITagsContainer
public int ProbeScore { get; set; }
[JsonPropertyName("tags")]
public Dictionary<string, string> Tags { get; set; } = null!;
public Dictionary<string, string>? Tags { get; set; }
}
public interface IDispositionContainer
@ -136,7 +136,7 @@ public interface IDispositionContainer
public interface ITagsContainer
{
Dictionary<string, string> Tags { get; set; }
Dictionary<string, string>? Tags { get; set; }
}
public static class TagExtensions

View file

@ -1,6 +1,6 @@
namespace FFMpegCore
{
public class MediaFormat
public class MediaFormat : ITagsContainer
{
public TimeSpan Duration { get; set; }
public TimeSpan StartTime { get; set; }

View file

@ -2,7 +2,7 @@
namespace FFMpegCore
{
public abstract class MediaStream
public abstract class MediaStream : ITagsContainer
{
public int Index { get; set; }
public string CodecName { get; set; } = null!;