avformat/nistshperedec: add support for mu-law as sample-byte-format

Signed-off-by: Paul B Mahol <onemda@gmail.com>
This commit is contained in:
Paul B Mahol 2016-04-08 22:26:08 +02:00
parent 966d43d778
commit a4790e1890

View File

@ -62,6 +62,7 @@ static int nist_read_header(AVFormatContext *s)
st->codec->bits_per_coded_sample = bps << 3;
if (!av_strcasecmp(coding, "pcm")) {
if (st->codec->codec_id == AV_CODEC_ID_NONE)
st->codec->codec_id = ff_get_pcm_codec_id(st->codec->bits_per_coded_sample,
0, be, 0xFFFF);
} else if (!av_strcasecmp(coding, "alaw")) {
@ -96,6 +97,8 @@ static int nist_read_header(AVFormatContext *s)
be = 0;
} else if (!av_strcasecmp(format, "10")) {
be = 1;
} else if (!av_strcasecmp(format, "mu-law")) {
st->codec->codec_id = AV_CODEC_ID_PCM_MULAW;
} else if (av_strcasecmp(format, "1")) {
avpriv_request_sample(s, "sample byte format %s", format);
return AVERROR_PATCHWELCOME;