summaryrefslogtreecommitdiff
path: root/libavformat/nistspheredec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2016-04-06 21:57:52 +0200
committerPaul B Mahol <onemda@gmail.com>2016-04-07 22:15:41 +0200
commit0c9490609d888ba384798777a3daaf012488ad89 (patch)
treea252db5ba90b74ee7caa9934f1a7fdb31b34deb9 /libavformat/nistspheredec.c
parentb7a776aa7bb6efe8a757ab899fb5046bee1120f0 (diff)
avformat: support shorten in nistshpere demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavformat/nistspheredec.c')
-rw-r--r--libavformat/nistspheredec.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavformat/nistspheredec.c b/libavformat/nistspheredec.c
index 2f17f9eeb0..b95a06d29c 100644
--- a/libavformat/nistspheredec.c
+++ b/libavformat/nistspheredec.c
@@ -34,7 +34,7 @@ static int nist_probe(AVProbeData *p)
static int nist_read_header(AVFormatContext *s)
{
- char buffer[32], coding[32] = "pcm", format[32] = "01";
+ char buffer[256], coding[32] = "pcm", format[32] = "01";
int bps = 0, be = 0;
int32_t header_size = -1;
AVStream *st;
@@ -69,6 +69,10 @@ static int nist_read_header(AVFormatContext *s)
} else if (!av_strcasecmp(coding, "ulaw") ||
!av_strcasecmp(coding, "mu-law")) {
st->codec->codec_id = AV_CODEC_ID_PCM_MULAW;
+ } else if (!av_strncasecmp(coding, "pcm,embedded-shorten", 20)) {
+ st->codec->codec_id = AV_CODEC_ID_SHORTEN;
+ if (ff_alloc_extradata(st->codec, 1))
+ st->codec->extradata[0] = 1;
} else {
avpriv_request_sample(s, "coding %s", coding);
}