X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavformat%2Foggparsecelt.c;h=6d567f988a307a7e0cd01c0cd5e67b3e1b38b98d;hb=f8b09e90e92ca74c664d661c4f459bfa1d6383b5;hp=2c0c511c7b7817c5f8358d8d5c793a5f613511be;hpb=ca408cf557b879cd08570c0b93ad98d40baec667;p=ffmpeg diff --git a/libavformat/oggparsecelt.c b/libavformat/oggparsecelt.c index 2c0c511c7b7..6d567f988a3 100644 --- a/libavformat/oggparsecelt.c +++ b/libavformat/oggparsecelt.c @@ -48,7 +48,7 @@ static int celt_header(AVFormatContext *s, int idx) priv = av_malloc(sizeof(struct oggcelt_private)); if (!priv) return AVERROR(ENOMEM); - if (ff_alloc_extradata(st->codec, 2 * sizeof(uint32_t)) < 0) { + if (ff_alloc_extradata(st->codecpar, 2 * sizeof(uint32_t)) < 0) { av_free(priv); return AVERROR(ENOMEM); } @@ -59,17 +59,17 @@ static int celt_header(AVFormatContext *s, int idx) overlap = AV_RL32(p + 48); /* unused bytes per packet field skipped */ extra_headers = AV_RL32(p + 56); - st->codec->codec_type = AVMEDIA_TYPE_AUDIO; - st->codec->codec_id = AV_CODEC_ID_CELT; - st->codec->sample_rate = sample_rate; - st->codec->channels = nb_channels; + st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; + st->codecpar->codec_id = AV_CODEC_ID_CELT; + st->codecpar->sample_rate = sample_rate; + st->codecpar->channels = nb_channels; if (sample_rate) avpriv_set_pts_info(st, 64, 1, sample_rate); priv->extra_headers_left = 1 + extra_headers; av_free(os->private); os->private = priv; - AV_WL32(st->codec->extradata + 0, overlap); - AV_WL32(st->codec->extradata + 4, version); + AV_WL32(st->codecpar->extradata + 0, overlap); + AV_WL32(st->codecpar->extradata + 4, version); return 1; } else if (priv && priv->extra_headers_left) { /* Extra headers (vorbiscomment) */