aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2021-04-04 17:16:17 +0200
committerGitHub <noreply@github.com>2021-04-04 17:16:17 +0200
commit7978f30ff78dcf7ba5b7b27b3201f81eb851f2b3 (patch)
tree1c777aab91290fca18e912fd469e87d513903910 /MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs
parent8eaefce14e8d325cfbabb1ade278d5e561a20f42 (diff)
parent873ad72c1893e87d1f8a0a744ebfe53b87781521 (diff)
Merge pull request #5693 from Maxr1998/probe-result-tweaks
Diffstat (limited to 'MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs')
-rw-r--r--MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs13
1 files changed, 8 insertions, 5 deletions
diff --git a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs b/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs
index b2d4db894..da37687e8 100644
--- a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs
+++ b/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
+using System.Globalization;
namespace MediaBrowser.MediaEncoding.Probing
{
@@ -85,12 +86,14 @@ namespace MediaBrowser.MediaEncoding.Probing
{
var val = GetDictionaryValue(tags, key);
- if (!string.IsNullOrEmpty(val))
+ if (string.IsNullOrEmpty(val))
{
- if (DateTime.TryParse(val, out var i))
- {
- return i.ToUniversalTime();
- }
+ return null;
+ }
+
+ if (DateTime.TryParse(val, DateTimeFormatInfo.CurrentInfo, DateTimeStyles.AssumeUniversal, out var i))
+ {
+ return i.ToUniversalTime();
}
return null;