diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-10 20:58:15 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-10 20:59:55 +0100 |
commit | 6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (patch) | |
tree | 0c2ec8349ff1763d5f48454b8b9f26374dbd80b0 /libavformat/rawvideodec.c | |
parent | 60b75186b2c878b6257b43c8fcc0b1356ada218e (diff) | |
parent | 9200514ad8717c63f82101dc394f4378854325bf (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/rawvideodec.c')
-rw-r--r-- | libavformat/rawvideodec.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/libavformat/rawvideodec.c b/libavformat/rawvideodec.c index 91bdba0e9a..b037aeaa59 100644 --- a/libavformat/rawvideodec.c +++ b/libavformat/rawvideodec.c @@ -45,9 +45,9 @@ static int rawvideo_read_header(AVFormatContext *ctx) if (!st) return AVERROR(ENOMEM); - st->codec->codec_type = AVMEDIA_TYPE_VIDEO; + st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; - st->codec->codec_id = ctx->iformat->raw_codec_id; + st->codecpar->codec_id = ctx->iformat->raw_codec_id; if ((pix_fmt = av_get_pix_fmt(s->pixel_format)) == AV_PIX_FMT_NONE) { av_log(ctx, AV_LOG_ERROR, "No such pixel format: %s.\n", @@ -57,14 +57,14 @@ static int rawvideo_read_header(AVFormatContext *ctx) avpriv_set_pts_info(st, 64, s->framerate.den, s->framerate.num); - st->codec->width = s->width; - st->codec->height = s->height; - st->codec->pix_fmt = pix_fmt; - packet_size = av_image_get_buffer_size(st->codec->pix_fmt, s->width, s->height, 1); + st->codecpar->width = s->width; + st->codecpar->height = s->height; + st->codecpar->format = pix_fmt; + packet_size = av_image_get_buffer_size(st->codecpar->format, s->width, s->height, 1); if (packet_size < 0) return packet_size; ctx->packet_size = packet_size; - st->codec->bit_rate = av_rescale_q(ctx->packet_size, + st->codecpar->bit_rate = av_rescale_q(ctx->packet_size, (AVRational){8,1}, st->time_base); return 0; |