diff --git a/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml b/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
index 25f981ee06..754be1af80 100644
--- a/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
+++ b/Emby.Dlna/Profiles/Xml/BubbleUPnp.xml
@@ -40,9 +40,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Default.xml b/Emby.Dlna/Profiles/Xml/Default.xml
index 81209c1f68..4e29f651ba 100644
--- a/Emby.Dlna/Profiles/Xml/Default.xml
+++ b/Emby.Dlna/Profiles/Xml/Default.xml
@@ -33,9 +33,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Denon AVR.xml b/Emby.Dlna/Profiles/Xml/Denon AVR.xml
index cdf09df0e9..6ddad31467 100644
--- a/Emby.Dlna/Profiles/Xml/Denon AVR.xml
+++ b/Emby.Dlna/Profiles/Xml/Denon AVR.xml
@@ -37,9 +37,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml b/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
index b8afed60e8..2021dae922 100644
--- a/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
+++ b/Emby.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
@@ -39,8 +39,8 @@
-
-
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml b/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
index 3b790986a2..eb63352a3f 100644
--- a/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
+++ b/Emby.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
@@ -43,9 +43,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Kodi.xml b/Emby.Dlna/Profiles/Xml/Kodi.xml
index 58f9e8e235..a78984b097 100644
--- a/Emby.Dlna/Profiles/Xml/Kodi.xml
+++ b/Emby.Dlna/Profiles/Xml/Kodi.xml
@@ -40,9 +40,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/LG Smart TV.xml b/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
index cc8bf947cc..dc0e977720 100644
--- a/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
+++ b/Emby.Dlna/Profiles/Xml/LG Smart TV.xml
@@ -42,9 +42,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml b/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
index 5723f144bf..862bede9b4 100644
--- a/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
+++ b/Emby.Dlna/Profiles/Xml/Linksys DMA2100.xml
@@ -37,9 +37,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/MediaMonkey.xml b/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
index 929f6898e4..48dfbf9bb1 100644
--- a/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
+++ b/Emby.Dlna/Profiles/Xml/MediaMonkey.xml
@@ -43,9 +43,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml b/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
index 3e3049d302..d7b142d84e 100644
--- a/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
+++ b/Emby.Dlna/Profiles/Xml/Panasonic Viera.xml
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml b/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
index bc73d23716..9bc4c2e312 100644
--- a/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
+++ b/Emby.Dlna/Profiles/Xml/Popcorn Hour.xml
@@ -38,9 +38,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml b/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
index 31210fac14..5b2106da54 100644
--- a/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
+++ b/Emby.Dlna/Profiles/Xml/Samsung Smart TV.xml
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
index 2bf57d4260..19a8ed5f9f 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
@@ -52,9 +52,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
index 703edc35ae..2fb9cf5838 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2014.xml
@@ -52,9 +52,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
index 69f4b73c64..956977643a 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2015.xml
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
index a24cfab895..ddb8f21008 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player 2016.xml
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
index 7ce41dea0a..154d9a68f7 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
@@ -47,9 +47,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
index 600d76ea71..4b7feded91 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2010).xml
@@ -45,9 +45,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
index 232896c8a7..39d7674a1e 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2011).xml
@@ -48,9 +48,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
index 5cf1c5eadb..8b6e88702e 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2012).xml
@@ -50,9 +50,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
index f009d6f11b..e76ca2c771 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2013).xml
@@ -55,9 +55,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml b/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
index f996652a8c..ff4aa9cf8e 100644
--- a/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
+++ b/Emby.Dlna/Profiles/Xml/Sony Bravia (2014).xml
@@ -55,9 +55,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml b/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
index 3608c343be..ff2e282f8a 100644
--- a/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony PlayStation 3.xml
@@ -45,9 +45,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml b/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
index 498f9966fb..7ec4ccc907 100644
--- a/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
+++ b/Emby.Dlna/Profiles/Xml/Sony PlayStation 4.xml
@@ -45,9 +45,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Vlc.xml b/Emby.Dlna/Profiles/Xml/Vlc.xml
index 3a5b7927bd..f1d9c1f2d1 100644
--- a/Emby.Dlna/Profiles/Xml/Vlc.xml
+++ b/Emby.Dlna/Profiles/Xml/Vlc.xml
@@ -40,9 +40,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/WDTV Live.xml b/Emby.Dlna/Profiles/Xml/WDTV Live.xml
index bf3531a307..96d37e7fb0 100644
--- a/Emby.Dlna/Profiles/Xml/WDTV Live.xml
+++ b/Emby.Dlna/Profiles/Xml/WDTV Live.xml
@@ -51,9 +51,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Xbox 360.xml b/Emby.Dlna/Profiles/Xml/Xbox 360.xml
index 2f0fee8c18..a470fa4cbc 100644
--- a/Emby.Dlna/Profiles/Xml/Xbox 360.xml
+++ b/Emby.Dlna/Profiles/Xml/Xbox 360.xml
@@ -46,9 +46,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/Xbox One.xml b/Emby.Dlna/Profiles/Xml/Xbox One.xml
index e47c308e43..8c13ed8fda 100644
--- a/Emby.Dlna/Profiles/Xml/Xbox One.xml
+++ b/Emby.Dlna/Profiles/Xml/Xbox One.xml
@@ -46,9 +46,9 @@
-
-
-
+
+
+
diff --git a/Emby.Dlna/Profiles/Xml/foobar2000.xml b/Emby.Dlna/Profiles/Xml/foobar2000.xml
index 51f649e36a..b793e22741 100644
--- a/Emby.Dlna/Profiles/Xml/foobar2000.xml
+++ b/Emby.Dlna/Profiles/Xml/foobar2000.xml
@@ -43,9 +43,9 @@
-
-
-
+
+
+
diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
index 4e7dc88363..322cdf4f0c 100644
--- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
+++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs
@@ -275,7 +275,9 @@ namespace Emby.Server.Implementations.HttpServer
{
if (_listener != null)
{
+ _logger.Info("Stopping HttpListener...");
_listener.Stop();
+ _logger.Info("HttpListener stopped");
}
}
@@ -713,19 +715,19 @@ namespace Emby.Server.Implementations.HttpServer
protected virtual void Dispose(bool disposing)
{
if (_disposed) return;
+
base.Dispose();
lock (_disposeLock)
{
if (_disposed) return;
+ _disposed = true;
+
if (disposing)
{
Stop();
}
-
- //release unmanaged resources here...
- _disposed = true;
}
}
diff --git a/Emby.Server.Implementations/Udp/UdpServer.cs b/Emby.Server.Implementations/Udp/UdpServer.cs
index c15e0ee41b..79a1e46404 100644
--- a/Emby.Server.Implementations/Udp/UdpServer.cs
+++ b/Emby.Server.Implementations/Udp/UdpServer.cs
@@ -154,6 +154,9 @@ namespace Emby.Server.Implementations.Udp
catch (ObjectDisposedException)
{
}
+ catch (OperationCanceledException)
+ {
+ }
catch (Exception ex)
{
_logger.ErrorException("Error receiving udp message", ex);
@@ -167,6 +170,11 @@ namespace Emby.Server.Implementations.Udp
/// The message.
private void OnMessageReceived(SocketReceiveResult message)
{
+ if (_isDisposed)
+ {
+ return;
+ }
+
if (message.RemoteEndPoint.Port == 0)
{
return;
@@ -221,6 +229,11 @@ namespace Emby.Server.Implementations.Udp
public async Task SendAsync(byte[] bytes, IpEndPointInfo remoteEndPoint)
{
+ if (_isDisposed)
+ {
+ throw new ObjectDisposedException(GetType().Name);
+ }
+
if (bytes == null)
{
throw new ArgumentNullException("bytes");
diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs
index 418ec7fcbc..42ca927a14 100644
--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs
+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs
@@ -1779,13 +1779,6 @@ namespace MediaBrowser.Api.Playback
request.Tag = val;
}
else if (i == 29)
- {
- if (videoRequest != null)
- {
- videoRequest.EnableSplittingOnNonKeyFrames = string.Equals("true", val, StringComparison.OrdinalIgnoreCase);
- }
- }
- else if (i == 30)
{
if (videoRequest != null)
{
@@ -2122,7 +2115,7 @@ namespace MediaBrowser.Api.Playback
state.MediaSource = mediaSource;
}
- protected virtual bool CanStreamCopyVideo(StreamState state)
+ protected bool CanStreamCopyVideo(StreamState state)
{
var request = state.VideoRequest;
var videoStream = state.VideoStream;
@@ -2407,7 +2400,6 @@ namespace MediaBrowser.Api.Playback
{
state.VideoRequest.CopyTimestamps = transcodingProfile.CopyTimestamps;
state.VideoRequest.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
- state.VideoRequest.EnableSplittingOnNonKeyFrames = transcodingProfile.EnableSplittingOnNonKeyFrames;
}
}
}
diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
index f1b5b4681c..171c971f1b 100644
--- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
+++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs
@@ -886,8 +886,7 @@ namespace MediaBrowser.Api.Playback.Hls
}
var mapArgs = state.IsOutputVideo ? GetMapArgs(state) : string.Empty;
- var enableSplittingOnNonKeyFrames = state.VideoRequest.EnableSplittingOnNonKeyFrames && string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase);
- enableSplittingOnNonKeyFrames = false;
+ var enableSplittingOnNonKeyFrames = string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase) && false;
// TODO: check libavformat version for 57 50.100 and use -hls_flags split_by_time
var hlsProtocolSupportsSplittingByTime = false;
diff --git a/MediaBrowser.Api/Playback/StreamRequest.cs b/MediaBrowser.Api/Playback/StreamRequest.cs
index 50c7797650..2a2ad92cd5 100644
--- a/MediaBrowser.Api/Playback/StreamRequest.cs
+++ b/MediaBrowser.Api/Playback/StreamRequest.cs
@@ -194,7 +194,6 @@ namespace MediaBrowser.Api.Playback
public bool CopyTimestamps { get; set; }
public bool EnableSubtitlesInManifest { get; set; }
- public bool EnableSplittingOnNonKeyFrames { get; set; }
public bool RequireAvc { get; set; }
public VideoStreamRequest()
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index cbbf434ff1..bc9a3488f2 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -480,7 +480,6 @@ namespace MediaBrowser.Model.Dlna
playlistItem.VideoCodec = transcodingProfile.VideoCodec;
playlistItem.CopyTimestamps = transcodingProfile.CopyTimestamps;
playlistItem.EnableSubtitlesInManifest = transcodingProfile.EnableSubtitlesInManifest;
- playlistItem.EnableSplittingOnNonKeyFrames = transcodingProfile.EnableSplittingOnNonKeyFrames;
if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels))
{
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index eb3b7d8fbf..5b8d40dfb8 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -39,7 +39,6 @@ namespace MediaBrowser.Model.Dlna
public bool RequireAvc { get; set; }
public bool CopyTimestamps { get; set; }
public bool EnableSubtitlesInManifest { get; set; }
- public bool EnableSplittingOnNonKeyFrames { get; set; }
public string[] AudioCodecs { get; set; }
public int? AudioStreamIndex { get; set; }
@@ -267,7 +266,6 @@ namespace MediaBrowser.Model.Dlna
list.Add(new NameValuePair("EnableSubtitlesInManifest", item.EnableSubtitlesInManifest.ToString().ToLower()));
list.Add(new NameValuePair("Tag", item.MediaSource.ETag ?? string.Empty));
- list.Add(new NameValuePair("EnableSplittingOnNonKeyFrames", item.EnableSplittingOnNonKeyFrames.ToString().ToLower()));
list.Add(new NameValuePair("RequireAvc", item.RequireAvc.ToString().ToLower()));
return list;
diff --git a/MediaBrowser.Model/Dlna/TranscodingProfile.cs b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
index 0f9fbae308..76f2332f26 100644
--- a/MediaBrowser.Model/Dlna/TranscodingProfile.cs
+++ b/MediaBrowser.Model/Dlna/TranscodingProfile.cs
@@ -39,9 +39,6 @@ namespace MediaBrowser.Model.Dlna
[XmlAttribute("enableSubtitlesInManifest")]
public bool EnableSubtitlesInManifest { get; set; }
- [XmlAttribute("enableSplittingOnNonKeyFrames")]
- public bool EnableSplittingOnNonKeyFrames { get; set; }
-
[XmlAttribute("maxAudioChannels")]
public string MaxAudioChannels { get; set; }