[vlc-commits] vlc_fourcc: add a define for "XAJ\00" (EA ADPCM)
Steve Lhomme
git at videolan.org
Wed Jul 12 12:23:48 CEST 2017
vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Jul 6 16:28:34 2017 +0200| [788c0561fe88107f2d2076a08f5d854990dc113b] | committer: Jean-Baptiste Kempf
vlc_fourcc: add a define for "XAJ\00" (EA ADPCM)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=788c0561fe88107f2d2076a08f5d854990dc113b
---
include/vlc_fourcc.h | 1 +
modules/codec/adpcm.c | 4 ++--
modules/demux/xa.c | 2 +-
src/misc/fourcc_list.h | 3 +++
4 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 1ac9d40508..b4c4d26bc7 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -440,6 +440,7 @@
#define VLC_CODEC_ADPCM_SBPRO_3 VLC_FOURCC('m','s',0x00,0xC3)
#define VLC_CODEC_ADPCM_SBPRO_4 VLC_FOURCC('m','s',0x00,0xC4)
#define VLC_CODEC_ADPCM_THP VLC_FOURCC('T','H','P','A')
+#define VLC_CODEC_ADPCM_XA_EA VLC_FOURCC('X','A','J', 0)
#define VLC_CODEC_G723_1 VLC_FOURCC('g','7','2', 0x31)
#define VLC_CODEC_G729 VLC_FOURCC('g','7','2','9')
#define VLC_CODEC_VMDAUDIO VLC_FOURCC('v','m','d','a')
diff --git a/modules/codec/adpcm.c b/modules/codec/adpcm.c
index 3abe252a23..0e1051de71 100644
--- a/modules/codec/adpcm.c
+++ b/modules/codec/adpcm.c
@@ -145,7 +145,7 @@ static int OpenDecoder( vlc_object_t *p_this )
case VLC_FOURCC('m','s',0x00,0x11): /* IMA ADPCM */
case VLC_CODEC_ADPCM_DK3:
case VLC_CODEC_ADPCM_DK4:
- case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */
+ case VLC_CODEC_ADPCM_XA_EA:
break;
default:
return VLC_EGENERIC;
@@ -189,7 +189,7 @@ static int OpenDecoder( vlc_object_t *p_this )
p_sys->codec = ADPCM_DK3;
i_max_channels = 2;
break;
- case VLC_FOURCC('X','A','J', 0): /* EA ADPCM */
+ case VLC_CODEC_ADPCM_EA: /* EA ADPCM */
p_sys->codec = ADPCM_EA;
p_sys->prev = calloc( 2 * p_dec->fmt_in.audio.i_channels,
sizeof( int16_t ) );
diff --git a/modules/demux/xa.c b/modules/demux/xa.c
index 92e06bf7b7..ee50663f14 100644
--- a/modules/demux/xa.c
+++ b/modules/demux/xa.c
@@ -115,7 +115,7 @@ static int Open( vlc_object_t * p_this )
}
es_format_t fmt;
- es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC('X','A','J',0) );
+ es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_ADPCM_EA );
msg_Dbg( p_demux, "assuming EA ADPCM audio codec" );
fmt.audio.i_rate = GetDWLE( &xa.nSamplesPerSec );
diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h
index 9d5a477052..21f849aea2 100644
--- a/src/misc/fourcc_list.h
+++ b/src/misc/fourcc_list.h
@@ -1308,6 +1308,9 @@ static const staticentry_t p_list_audio[] = {
B(VLC_CODEC_ADPCM_THP, "GameCube THP ADPCM"),
+ B(VLC_CODEC_ADPCM_XA_EA, "EA-XA ADPCM"),
+ A("XAJ\x00"),
+
/* AMR */
B(VLC_CODEC_AMR_NB, "AMR narrow band"),
A("samr"),
More information about the vlc-commits
mailing list