- ff_alloc_extradata(st->codecpar, 14);
- if (!st->codecpar->extradata)
- return AVERROR(ENOMEM);
- ret = avio_read(s->pb, st->codecpar->extradata, 14);
- if (ret < 10)
- return ret < 0 ? ret : AVERROR_EOF;
+ ret = ff_get_extradata(s, st->codecpar, s->pb, 14);
+ if (ret < 0)
+ return ret;