add chapter image error handling

This commit is contained in:
Luke Pulverenti
2016-09-05 16:07:36 -04:00
parent cc7b150b90
commit d4324b7e89
12 changed files with 126 additions and 34 deletions

View File

@@ -1791,8 +1791,7 @@ namespace MediaBrowser.Api.Playback
if (!string.IsNullOrWhiteSpace(state.VideoRequest.VideoCodec))
{
state.SupportedVideoCodecs = state.VideoRequest.VideoCodec.Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();
state.VideoRequest.VideoCodec = state.SupportedVideoCodecs.FirstOrDefault(i => MediaEncoder.CanEncodeToAudioCodec(i))
?? state.SupportedVideoCodecs.FirstOrDefault();
state.VideoRequest.VideoCodec = state.SupportedVideoCodecs.FirstOrDefault();
}
}