[FFmpeg-cvslog] avformat/brstm: support little-endian s16 PCM

Paul B Mahol git at videolan.org
Sun Jun 21 13:18:01 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jun 21 10:21:20 2015 +0000| [a49154e9d79ae44204072dc1cad74742a8dd63d0] | committer: Paul B Mahol

avformat/brstm: support little-endian s16 PCM

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a49154e9d79ae44204072dc1cad74742a8dd63d0
---

 libavformat/brstm.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavformat/brstm.c b/libavformat/brstm.c
index 45bdb72..1d190c9 100644
--- a/libavformat/brstm.c
+++ b/libavformat/brstm.c
@@ -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;



More information about the ffmpeg-cvslog mailing list