Browse Source

fix audio stream selection (#1010)

pull/1011/head
Jason Dove 3 years ago committed by GitHub
parent
commit
d8cc6b4c22
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      ErsatzTV.Core/FFmpeg/FFmpegStreamSelector.cs

12
ErsatzTV.Core/FFmpeg/FFmpegStreamSelector.cs

@ -88,7 +88,11 @@ public class FFmpegStreamSelector : IFFmpegStreamSelector @@ -88,7 +88,11 @@ public class FFmpegStreamSelector : IFFmpegStreamSelector
version.MediaVersion);
sw.Stop();
_logger.LogDebug("SelectAudioStream duration: {Duration}", sw.Elapsed);
return result;
if (result.IsSome)
{
return result;
}
break;
case Movie:
var sw2 = Stopwatch.StartNew();
Option<MediaStream> result2 = await SelectMovieAudioStream(
@ -98,7 +102,11 @@ public class FFmpegStreamSelector : IFFmpegStreamSelector @@ -98,7 +102,11 @@ public class FFmpegStreamSelector : IFFmpegStreamSelector
version.MediaVersion);
sw2.Stop();
_logger.LogDebug("SelectAudioStream duration: {Duration}", sw2.Elapsed);
return result2;
if (result2.IsSome)
{
return result2;
}
break;
// let default fall through
}
}

Loading…
Cancel
Save