aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/LiveTv/EmbyTV
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-11 18:08:19 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2016-05-11 18:08:19 -0400
commitc4e3bbaf4a9446250463f79c2b93728e8dfcd739 (patch)
tree86b6ac0538f3a452d6ea9e12013a370efd9b5790 /MediaBrowser.Server.Implementations/LiveTv/EmbyTV
parent761a476ea09bfe657ca824d15b1a71a8f9f3206e (diff)
import shared media info component
Diffstat (limited to 'MediaBrowser.Server.Implementations/LiveTv/EmbyTV')
-rw-r--r--MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
index 85b6ead07b..e9ea49fa32 100644
--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EncodedRecorder.cs
@@ -46,7 +46,12 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
{
if (_liveTvOptions.EnableOriginalAudioWithEncodedRecordings)
{
- return Path.ChangeExtension(targetFile, ".mkv");
+ // if the audio is aac_latm, stream copying to mp4 will fail
+ var streams = mediaSource.MediaStreams ?? new List<MediaStream>();
+ if (streams.Any(i => i.Type == MediaStreamType.Audio && (i.Codec ?? string.Empty).IndexOf("aac", StringComparison.OrdinalIgnoreCase) != -1))
+ {
+ return Path.ChangeExtension(targetFile, ".mkv");
+ }
}
return Path.ChangeExtension(targetFile, ".mp4");