Apply suggestions from code review

Co-authored-by: BaronGreenback <jimcartlidge@yahoo.co.uk>
This commit is contained in:
Nyanmisaka 2020-11-28 21:14:55 +08:00 committed by GitHub
parent d19edefbcd
commit 53c91c2c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -554,7 +554,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty; var mapArg = imageStreamIndex.HasValue ? (" -map 0:v:" + imageStreamIndex.Value.ToString(CultureInfo.InvariantCulture)) : string.Empty;
// Use ffmpeg to sample 100 (we can drop this if required using thumbnail=50 for 50 frames) frames and pick the best thumbnail. Have a fall back just in case. // Use ffmpeg to sample 100 (we can drop this if required using thumbnail=50 for 50 frames) frames and pick the best thumbnail. Have a fall back just in case.
var enableThumbnail = useIFrame && !new List<string> { "wtv" }.Contains(container ?? string.Empty, StringComparer.OrdinalIgnoreCase); var enableThumbnail = useIFrame && !string.Equals("wtv", container, StringComparer.OrdinalIgnoreCase);
if (string.IsNullOrEmpty(vf)) if (string.IsNullOrEmpty(vf))
{ {
vf = enableThumbnail ? "-vf thumbnail=24" : string.Empty; vf = enableThumbnail ? "-vf thumbnail=24" : string.Empty;