Browse Source

avcodec/opus: check if internal is available

tags/n4.2
Paul B Mahol 7 years ago
parent
commit
68f289dacd
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      libavcodec/opus.c

+ 3
- 1
libavcodec/opus.c View File

@@ -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) {


Loading…
Cancel
Save