app/src/main/java/com/anyun/h264/H264EncodeService2.java
@@ -286,6 +286,9 @@ // 创建编码器 h264Encoder = new H264Encoder(); // 设置 Context(用于清理 TF 卡文件) h264Encoder.setContext(this); // 设置编码参数(使用配置中的参数) // 设置编码参数(使用配置中的参数) int width = config != null && config.width > 0 ? config.width : DEFAULT_WIDTH; @@ -352,6 +355,9 @@ // 创建编码器 h264Encoder = new H264Encoder(); // 设置 Context(用于清理 TF 卡文件) h264Encoder.setContext(this); // 设置编码参数(使用配置中的参数) int width = config != null && config.width > 0 ? config.width : DEFAULT_WIDTH; int height = config != null && config.height > 0 ? config.height : DEFAULT_HEIGHT;