48 lines
1.5 KiB
Diff
48 lines
1.5 KiB
Diff
|
From cfd06e4edecdca2013e0fe04db135fd110a68203 Mon Sep 17 00:00:00 2001
|
||
|
From: =?UTF-8?q?=D0=9C=D0=B0=D0=BA=D1=81=D0=B8=D0=BC=20=D0=91=D0=B0=D0=B3?=
|
||
|
=?UTF-8?q?=D1=80=D1=8F=D0=BD=D1=86=D0=B5=D0=B2?= <maxbag97619@gmail.com>
|
||
|
Date: Mon, 11 Nov 2019 00:53:06 +0300
|
||
|
Subject: [PATCH] Added WAVE_FORMAT_EXTENSIBLE with value 0xfffe and supressed
|
||
|
error on wav header parsing with that format
|
||
|
|
||
|
---
|
||
|
include/wave.h | 1 +
|
||
|
src/core_wave.c | 5 ++++-
|
||
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/include/wave.h b/include/wave.h
|
||
|
index 01aa3fe..039ca19 100644
|
||
|
--- a/include/wave.h
|
||
|
+++ b/include/wave.h
|
||
|
@@ -59,6 +59,7 @@
|
||
|
#define WAVE_FORMAT_MPEGLAYER3 (0x0055)
|
||
|
#define WAVE_FORMAT_G726_ADPCM (0x0064)
|
||
|
#define WAVE_FORMAT_G722_ADPCM (0x0065)
|
||
|
+#define WAVE_FORMAT_EXTENSIBLE (0xfffe)
|
||
|
|
||
|
#define CD_BLOCK_SIZE (2352)
|
||
|
#define CD_BLOCKS_PER_SEC (75)
|
||
|
diff --git a/src/core_wave.c b/src/core_wave.c
|
||
|
index 47c36c9..7bea4d1 100644
|
||
|
--- a/src/core_wave.c
|
||
|
+++ b/src/core_wave.c
|
||
|
@@ -167,6 +167,7 @@ bool verify_wav_header_internal(wave_info *info,bool verbose)
|
||
|
}
|
||
|
|
||
|
switch (info->wave_format) {
|
||
|
+ case WAVE_FORMAT_EXTENSIBLE:
|
||
|
case WAVE_FORMAT_PCM:
|
||
|
break;
|
||
|
default:
|
||
|
@@ -511,7 +512,9 @@ char *format_to_str(wshort format)
|
||
|
case WAVE_FORMAT_G726_ADPCM:
|
||
|
return "G.726 ADPCM";
|
||
|
case WAVE_FORMAT_G722_ADPCM:
|
||
|
- return "G.722 ADPCM";
|
||
|
+ return "G.722 ADPCM";
|
||
|
+ case WAVE_FORMAT_EXTENSIBLE:
|
||
|
+ return "WAVE Extensible format";
|
||
|
}
|
||
|
return "Unknown";
|
||
|
}
|