diff options
-rw-r--r-- | libavcodec/av1_parser.c | 2 | ||||
-rw-r--r-- | libavcodec/av1dec.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/libavcodec/av1_parser.c b/libavcodec/av1_parser.c index 14826d816e..181ff3a1be 100644 --- a/libavcodec/av1_parser.c +++ b/libavcodec/av1_parser.c @@ -73,7 +73,7 @@ static int av1_parser_parse(AVCodecParserContext *ctx, if (avctx->extradata_size && !s->parsed_extradata) { s->parsed_extradata = 1; - ret = ff_cbs_read(s->cbc, td, avctx->extradata, avctx->extradata_size); + ret = ff_cbs_read_extradata_from_codec(s->cbc, td, avctx); if (ret < 0) { av_log(avctx, AV_LOG_WARNING, "Failed to parse extradata.\n"); } diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index c1967f03bd..ce051d4e6d 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -616,8 +616,9 @@ static av_cold int av1_decode_init(AVCodecContext *avctx) return ret; if (avctx->extradata && avctx->extradata_size) { - ret = ff_cbs_read(s->cbc, &s->current_obu, avctx->extradata, - avctx->extradata_size); + ret = ff_cbs_read_extradata_from_codec(s->cbc, + &s->current_obu, + avctx); if (ret < 0) { av_log(avctx, AV_LOG_WARNING, "Failed to read extradata.\n"); return ret; |