浏览代码

CodecsComponent: don't try to use system video decoder for 10 bit h264

Vincent Lang 9 年之前
父节点
当前提交
28cd5aed19
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/player/CodecsComponent.cpp

+ 6 - 0
src/player/CodecsComponent.cpp

@@ -560,6 +560,12 @@ static CodecDriver selectBestDecoder(const StreamInfo& stream)
       if ((codec.isWhitelistedSystemAudioCodec() && useSystemAudioDecoders()) ||
           (codec.isWhitelistedSystemVideoCodec() && useSystemVideoDecoders()))
         score = 15;
+      if (codec.format == "h264")
+      {
+        // Avoid using system video decoders for h264 profiles usually not supported.
+        if (stream.profile != "" && stream.profile != "main" && stream.profile != "baseline" && stream.profile != "high")
+          score = 1;
+      }
     }
     else
     {