summaryrefslogtreecommitdiff
path: root/libavformat/oggparsetheora.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 01d1518c2a..1e7a776c06 100644
--- a/libavformat/oggparsetheora.c
+++ b/libavformat/oggparsetheora.c
@@ -41,7 +41,7 @@ static int theora_header(AVFormatContext *s, int idx)
struct ogg_stream *os = ogg->streams + idx;
AVStream *st = s->streams[idx];
TheoraParams *thp = os->private;
- int cds = st->codec->extradata_size + os->psize + 2;
+ int cds = st->codecpar->extradata_size + os->psize + 2;
int err;
uint8_t *cdp;
@@ -72,8 +72,8 @@ static int theora_header(AVFormatContext *s, int idx)
return AVERROR(ENOSYS);
}
- st->codec->width = get_bits(&gb, 16) << 4;
- st->codec->height = get_bits(&gb, 16) << 4;
+ st->codecpar->width = get_bits(&gb, 16) << 4;
+ st->codecpar->height = get_bits(&gb, 16) << 4;
if (thp->version >= 0x030400)
skip_bits(&gb, 100);
@@ -81,10 +81,10 @@ static int theora_header(AVFormatContext *s, int idx)
if (thp->version >= 0x030200) {
int width = get_bits_long(&gb, 24);
int height = get_bits_long(&gb, 24);
- if (width <= st->codec->width && width > st->codec->width - 16 &&
- height <= st->codec->height && height > st->codec->height - 16) {
- st->codec->width = width;
- st->codec->height = height;
+ if (width <= st->codecpar->width && width > st->codecpar->width - 16 &&
+ height <= st->codecpar->height && height > st->codecpar->height - 16) {
+ st->codecpar->width = width;
+ st->codecpar->height = height;
}
skip_bits(&gb, 16);
@@ -110,8 +110,8 @@ static int theora_header(AVFormatContext *s, int idx)
thp->gpshift = get_bits(&gb, 5);
thp->gpmask = (1 << thp->gpshift) - 1;
- st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
- st->codec->codec_id = AV_CODEC_ID_THEORA;
+ st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
+ st->codecpar->codec_id = AV_CODEC_ID_THEORA;
st->need_parsing = AVSTREAM_PARSE_HEADERS;
}
break;
@@ -125,16 +125,16 @@ static int theora_header(AVFormatContext *s, int idx)
return AVERROR_INVALIDDATA;
}
- if ((err = av_reallocp(&st->codec->extradata,
+ if ((err = av_reallocp(&st->codecpar->extradata,
cds + AV_INPUT_BUFFER_PADDING_SIZE)) < 0) {
- st->codec->extradata_size = 0;
+ st->codecpar->extradata_size = 0;
return err;
}
- cdp = st->codec->extradata + st->codec->extradata_size;
+ cdp = st->codecpar->extradata + st->codecpar->extradata_size;
*cdp++ = os->psize >> 8;
*cdp++ = os->psize & 0xff;
memcpy(cdp, os->buf + os->pstart, os->psize);
- st->codec->extradata_size = cds;
+ st->codecpar->extradata_size = cds;
return 1;
}