mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-17 04:54:55 +00:00
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:
parent
966d43d778
commit
a4790e1890
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user