[vlc-commits] vlc_fourcc: add a define for "sowt" (Raw Signed PCM little-endian)

Steve Lhomme git at videolan.org
Wed Jul 12 12:24:05 CEST 2017


vlc | branch: master | Steve Lhomme <robux4 at videolabs.io> | Thu Jul  6 17:25:46 2017 +0200| [8c8ed66efa1be0222865c98784ba12db6376c996] | committer: Jean-Baptiste Kempf

vlc_fourcc: add a define for "sowt" (Raw Signed PCM little-endian)

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c8ed66efa1be0222865c98784ba12db6376c996
---

 include/vlc_fourcc.h   | 1 +
 modules/codec/araw.c   | 2 +-
 modules/demux/caf.c    | 2 +-
 src/misc/fourcc.c      | 2 +-
 src/misc/fourcc_list.h | 3 +++
 5 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 965940f348..1f1f0758e1 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -475,6 +475,7 @@
 
 #define VLC_CODEC_RAW_PCM                    VLC_FOURCC('a','r','a','w')
 #define VLC_CODEC_RAW_PCM_SIGNED_BE          VLC_FOURCC('t','w','o','s')
+#define VLC_CODEC_RAW_PCM_SIGNED_LE          VLC_FOURCC('s','o','w','t')
 #define VLC_CODEC_RAW_IEEE_PCM               VLC_FOURCC('a','f','l','t')
 #define VLC_CODEC_S8                         VLC_FOURCC('s','8',' ',' ')
 #define VLC_CODEC_U8                         VLC_FOURCC('u','8',' ',' ')
diff --git a/modules/codec/araw.c b/modules/codec/araw.c
index 44728cb585..e065467d77 100644
--- a/modules/codec/araw.c
+++ b/modules/codec/araw.c
@@ -121,7 +121,7 @@ static int DecoderOpen( vlc_object_t *p_this )
     /* _signed_ big endian samples (mov) */
     case VLC_CODEC_RAW_PCM_SIGNED_BE:
     /* _signed_ little endian samples (mov) */
-    case VLC_FOURCC('s','o','w','t'):
+    case VLC_CODEC_RAW_PCM_SIGNED_LE:
         format =
             vlc_fourcc_GetCodecAudio( p_dec->fmt_in.i_codec,
                                       p_dec->fmt_in.audio.i_bitspersample );
diff --git a/modules/demux/caf.c b/modules/demux/caf.c
index 1b820c4bb3..162526e735 100644
--- a/modules/demux/caf.c
+++ b/modules/demux/caf.c
@@ -462,7 +462,7 @@ static int ReadDescChunk( demux_t *p_demux )
 
         if( !b_is_float )
         {
-            i_basic_codec = b_is_be ? VLC_CODEC_RAW_PCM_SIGNED_BE : VLC_FOURCC( 's', 'o', 'w', 't' );
+            i_basic_codec = b_is_be ? VLC_CODEC_RAW_PCM_SIGNED_BE : VLC_CODEC_RAW_PCM_SIGNED_LE;
             es_format_Init( &p_sys->fmt, AUDIO_ES, vlc_fourcc_GetCodecAudio( i_basic_codec, i_unpacked_bits_per_sample ));
         }
         else
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index 838262fc13..7c189c4853 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -175,7 +175,7 @@ vlc_fourcc_t vlc_fourcc_GetCodecAudio( vlc_fourcc_t i_fourcc, int i_bits )
             return 0;
         }
     }
-    else if( i_fourcc == VLC_FOURCC( 's', 'o', 'w', 't' ) )
+    else if( i_fourcc == VLC_CODEC_RAW_PCM_SIGNED_LE )
     {
         switch( i_bytes )
         {
diff --git a/src/misc/fourcc_list.h b/src/misc/fourcc_list.h
index 13f89c9d29..6f65faeb3e 100644
--- a/src/misc/fourcc_list.h
+++ b/src/misc/fourcc_list.h
@@ -1436,6 +1436,9 @@ static const staticentry_t p_list_audio[] = {
     B(VLC_CODEC_RAW_PCM_SIGNED_BE, "Raw Signed PCM big-endian"),
         A("twos"),
 
+    B(VLC_CODEC_RAW_PCM_SIGNED_LE, "Raw Signed PCM little-endian"),
+        A("sowt"),
+
     B(VLC_CODEC_RAW_IEEE_PCM, "Raw IEEE Float PCM"),
         A("aflt"),
 



More information about the vlc-commits mailing list