fixes #170 - MI aspect ratio

This commit is contained in:
Luke Pulverenti 2013-04-23 11:11:20 -04:00
parent e977548b06
commit 0e7ad811ac

View File

@ -431,6 +431,22 @@ namespace MediaBrowser.Server.Implementations.MediaEncoder
cancellationToken.ThrowIfCancellationRequested();
if (result.streams != null)
{
// Normalize aspect ratio if invalid
foreach (var stream in result.streams)
{
if (string.Equals(stream.display_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase))
{
stream.display_aspect_ratio = string.Empty;
}
if (string.Equals(stream.sample_aspect_ratio, "0:1", StringComparison.OrdinalIgnoreCase))
{
stream.sample_aspect_ratio = string.Empty;
}
}
}
if (extractChapters && !string.IsNullOrEmpty(standardError))
{
AddChapters(result, standardError);