Просмотр исходного кода

Merge pull request #1985 from softworkz/MediaFixes

Fix audio stream for channel media and some minor corrections
Luke 9 лет назад
Родитель
Сommit
cb994c3e7a
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      MediaBrowser.Controller/Channels/ChannelMediaInfo.cs

+ 4 - 2
MediaBrowser.Controller/Channels/ChannelMediaInfo.cs

@@ -83,8 +83,7 @@ namespace MediaBrowser.Controller.Channels
         {
             var list = new List<MediaStream>();
 
-            if (!string.IsNullOrWhiteSpace(info.VideoCodec) &&
-                !string.IsNullOrWhiteSpace(info.AudioCodec))
+            if (!string.IsNullOrWhiteSpace(info.VideoCodec))
             {
                 list.Add(new MediaStream
                 {
@@ -99,7 +98,10 @@ namespace MediaBrowser.Controller.Channels
                     BitRate = info.VideoBitrate,
                     AverageFrameRate = info.Framerate
                 });
+            }
 
+            if (!string.IsNullOrWhiteSpace(info.AudioCodec))
+            {
                 list.Add(new MediaStream
                 {
                     Type = MediaStreamType.Audio,