This lets us re-utilize the extradata-related checks in the CBS
to add support for passing the AV1CodecConfigurationRecord
as extradata as-is without further filtering.
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");
}
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;