浏览代码

don't parse dmap unknown fields

philippe44 1 年之前
父节点
当前提交
5fd09e2a34
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 2 1
      components/raop/dmap_parser.c
  2. 2 2
      components/squeezelite/output_i2s.c

+ 2 - 1
components/raop/dmap_parser.c

@@ -424,7 +424,7 @@ static int dmap_parse_internal(const dmap_settings *settings, const char *buf, s
 			/* Make a best guess of the type */
 			field_type = DMAP_UNKNOWN;
 			field_name = code;
-
+#ifdef DMAP_FULL    
 			if (field_len >= 8) {
 				/* Look for a four char code followed by a length within the current field */
 				if (isalpha(p[0] & 0xff) &&
@@ -448,6 +448,7 @@ static int dmap_parse_internal(const dmap_settings *settings, const char *buf, s
 
 				field_type = is_string ? DMAP_STR : DMAP_UINT;
 			}
+#endif            
 		}
 
 		switch (field_type) {

+ 2 - 2
components/squeezelite/output_i2s.c

@@ -283,8 +283,8 @@ void output_init_i2s(log_level level, char *device, unsigned output_buf_size, ch
 		i2s_config.dma_buf_count = DMA_BUF_COUNT * 2;
 		/* 
 		   In DMA, we have room for (LEN * COUNT) frames of 32 bits samples that 
-		   we push at sample_rate * 2. Each of these peuso-frames is a single true
-		   audio frame. So the real depth is true frames is (LEN * COUNT / 2)
+		   we push at sample_rate * 2. Each of these pseudo-frames is a single true
+		   audio frame. So the real depth in true frames is (LEN * COUNT / 2)
 		*/   
 		dma_buf_frames = DMA_BUF_COUNT * DMA_BUF_LEN / 2;