소스 검색

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