avformat/brstm: support little-endian s16 PCM
authorPaul B Mahol <onemda@gmail.com>
Sun, 21 Jun 2015 10:21:20 +0000 (10:21 +0000)
committerPaul B Mahol <onemda@gmail.com>
Sun, 21 Jun 2015 10:32:13 +0000 (10:32 +0000)
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavformat/brstm.c

index 45bdb72..1d190c9 100644 (file)
@@ -184,7 +184,9 @@ static int read_header(AVFormatContext *s)
 
     switch (codec) {
     case 0: codec = AV_CODEC_ID_PCM_S8_PLANAR;    break;
-    case 1: codec = AV_CODEC_ID_PCM_S16BE_PLANAR; break;
+    case 1: codec = b->little_endian ?
+                    AV_CODEC_ID_PCM_S16LE_PLANAR :
+                    AV_CODEC_ID_PCM_S16BE_PLANAR; break;
     case 2: codec = b->little_endian ?
                     AV_CODEC_ID_ADPCM_THP_LE :
                     AV_CODEC_ID_ADPCM_THP;        break;