aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/shorten.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 /libavcodec/shorten.c
parentb7a776aa7bb6efe8a757ab899fb5046bee1120f0 (diff)
downloadffmpeg-0c9490609d888ba384798777a3daaf012488ad89.tar.gz
avformat: support shorten in nistshpere demuxer
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavcodec/shorten.c')
-rw-r--r--libavcodec/shorten.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index b27707a712..9da04eb117 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -387,6 +387,9 @@ static int read_header(ShortenContext *s)
if (s->version > 1)
s->lpcqoffset = V2LPCQOFFSET;
+ if (s->avctx->extradata_size > 0)
+ goto end;
+
if (get_ur_golomb_shorten(&s->gb, FNSIZE) != FN_VERBATIM) {
av_log(s->avctx, AV_LOG_ERROR,
"missing verbatim section at beginning of stream\n");
@@ -407,6 +410,7 @@ static int read_header(ShortenContext *s)
if ((ret = decode_wave_header(s->avctx, s->header, s->header_size)) < 0)
return ret;
+end:
s->cur_chan = 0;
s->bitshift = 0;