diff options
author | Paul B Mahol <onemda@gmail.com> | 2018-11-28 20:27:43 +0100 |
---|---|---|
committer | Paul B Mahol <onemda@gmail.com> | 2018-11-28 20:29:23 +0100 |
commit | 68f289dacddcdf9742a8e9af51956ac226bfbafb (patch) | |
tree | a856865a5786b758449ef91c7d7d9d588348709e | |
parent | 331715534a5bbf692b468989225104cd9bbf9fdb (diff) | |
download | ffmpeg-68f289dacddcdf9742a8e9af51956ac226bfbafb.tar.gz |
avcodec/opus: check if internal is available
-rw-r--r-- | libavcodec/opus.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/opus.c b/libavcodec/opus.c index 22cda64801..f74278a7e3 100644 --- a/libavcodec/opus.c +++ b/libavcodec/opus.c @@ -326,7 +326,9 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx, return AVERROR_PATCHWELCOME; } - avctx->delay = avctx->internal->skip_samples = AV_RL16(extradata + 10); + avctx->delay = AV_RL16(extradata + 10); + if (avctx->internal) + avctx->internal->skip_samples = avctx->delay; channels = avctx->extradata ? extradata[9] : (avctx->channels == 1) ? 1 : 2; if (!channels) { |