浏览代码

ChannelMediaInfo: Create audio stream even when there is no video

softworkz 9 年之前
父节点
当前提交
267ada923c
共有 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,