case 4: /* stream with extradata */
if (item_len < 30)
return AVERROR_INVALIDDATA;
- av_freep(&st->codec->extradata);
- if (ff_alloc_extradata(st->codec, 26 + item_len)) {
+ av_freep(&st->codecpar->extradata);
+ if (ff_alloc_extradata(st->codecpar, 26 + item_len)) {
return AVERROR(ENOMEM);
}
- AV_WB32(st->codec->extradata, 12);
- memcpy(st->codec->extradata + 4, "frma", 4);
- memcpy(st->codec->extradata + 8, "QDM2", 4);
- AV_WB32(st->codec->extradata + 12, 6 + item_len);
- memcpy(st->codec->extradata + 16, "QDCA", 4);
- memcpy(st->codec->extradata + 20, p + 2, item_len - 2);
- AV_WB32(st->codec->extradata + 18 + item_len, 8);
- AV_WB32(st->codec->extradata + 22 + item_len, 0);
+ AV_WB32(st->codecpar->extradata, 12);
+ memcpy(st->codecpar->extradata + 4, "frma", 4);
+ memcpy(st->codecpar->extradata + 8, "QDM2", 4);
+ AV_WB32(st->codecpar->extradata + 12, 6 + item_len);
+ memcpy(st->codecpar->extradata + 16, "QDCA", 4);
+ memcpy(st->codecpar->extradata + 20, p + 2, item_len - 2);
+ AV_WB32(st->codecpar->extradata + 18 + item_len, 8);
+ AV_WB32(st->codecpar->extradata + 22 + item_len, 0);
qdm->block_size = AV_RB32(p + 26);
break;
* carried within the RTP stream, not SDP. Here,
* by setting codec_id to AV_CODEC_ID_QDM2, we are signalling
* to the decoder that it is OK to initialize. */
- st->codec->codec_id = AV_CODEC_ID_QDM2;
+ st->codecpar->codec_id = AV_CODEC_ID_QDM2;
}
- if (st->codec->codec_id == AV_CODEC_ID_NONE)
+ if (st->codecpar->codec_id == AV_CODEC_ID_NONE)
return AVERROR(EAGAIN);
/* subpackets */