Sfoglia il codice sorgente

stream 中可能不止包含 video 和 audio 两个流, 目前这样修改只是治标不治本

reghao 2 anni fa
parent
commit
2670d04b75

+ 4 - 0
media/src/main/java/cn/reghao/jutil/media/FFmpegWrapper.java

@@ -52,6 +52,10 @@ public class FFmpegWrapper {
                     }
                     audioProps = new AudioProps(codecName, codecTagString, bitRate, duration);
                 } else if (codecType.equals("video")) {
+                    if (videoProps != null) {
+                        continue;
+                    }
+
                     String codecName = jsonObject1.get("codec_name").getAsString();
                     String codecTagString = jsonObject1.get("codec_tag_string").getAsString();