Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-10 22:58:15 +0300
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2016-04-10 22:59:55 +0300
commit6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (patch)
tree0c2ec8349ff1763d5f48454b8b9f26374dbd80b0 /libavformat/oggparsetheora.c
parent60b75186b2c878b6257b43c8fcc0b1356ada218e (diff)
parent9200514ad8717c63f82101dc394f4378854325bf (diff)
Merge commit '9200514ad8717c63f82101dc394f4378854325bf'
* commit '9200514ad8717c63f82101dc394f4378854325bf': lavf: replace AVStream.codec with AVStream.codecpar This has been a HUGE effort from: - Derek Buitenhuis <derek.buitenhuis@gmail.com> - Hendrik Leppkes <h.leppkes@gmail.com> - wm4 <nfxjfg@googlemail.com> - Clément Bœsch <clement@stupeflix.com> - James Almer <jamrial@gmail.com> - Michael Niedermayer <michael@niedermayer.cc> - Rostislav Pehlivanov <atomnuker@gmail.com> Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavformat/oggparsetheora.c')
-rw-r--r--libavformat/oggparsetheora.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libavformat/oggparsetheora.c b/libavformat/oggparsetheora.c
index 5f057c3c8a..b14f9f0669 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 = (1U << 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;
@@ -126,18 +126,18 @@ 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;
}
- memset(st->codec->extradata + cds, 0, AV_INPUT_BUFFER_PADDING_SIZE);
+ memset(st->codecpar->extradata + cds, 0, AV_INPUT_BUFFER_PADDING_SIZE);
- 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;
}