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/cinedec.c | |
parent | 60b75186b2c878b6257b43c8fcc0b1356ada218e (diff) | |
parent | 9200514ad8717c63f82101dc394f4378854325bf (diff) | |
download | ffmpeg-6f69f7a8bf6a0d013985578df2ef42ee6b1c7994.tar.gz |
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/cinedec.c')
-rw-r--r-- | libavformat/cinedec.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavformat/cinedec.c b/libavformat/cinedec.c index 318408436f..0efedda1a3 100644 --- a/libavformat/cinedec.c +++ b/libavformat/cinedec.c @@ -101,9 +101,9 @@ static int cine_read_header(AVFormatContext *avctx) st = avformat_new_stream(avctx, NULL); if (!st) return AVERROR(ENOMEM); - st->codec->codec_type = AVMEDIA_TYPE_VIDEO; - st->codec->codec_id = AV_CODEC_ID_RAWVIDEO; - st->codec->codec_tag = 0; + st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO; + st->codecpar->codec_id = AV_CODEC_ID_RAWVIDEO; + st->codecpar->codec_tag = 0; /* CINEFILEHEADER structure */ avio_skip(pb, 4); // Type, Headersize @@ -127,8 +127,8 @@ static int cine_read_header(AVFormatContext *avctx) /* BITMAPINFOHEADER structure */ avio_seek(pb, offImageHeader, SEEK_SET); avio_skip(pb, 4); //biSize - st->codec->width = avio_rl32(pb); - st->codec->height = avio_rl32(pb); + st->codecpar->width = avio_rl32(pb); + st->codecpar->height = avio_rl32(pb); if (avio_rl16(pb) != 1) // biPlanes return AVERROR_INVALIDDATA; @@ -144,7 +144,7 @@ static int cine_read_header(AVFormatContext *avctx) vflip = 0; break; case 0x100: /* BI_PACKED */ - st->codec->codec_tag = MKTAG('B', 'I', 'T', 0); + st->codecpar->codec_tag = MKTAG('B', 'I', 'T', 0); vflip = 1; break; default: @@ -167,8 +167,8 @@ static int cine_read_header(AVFormatContext *avctx) avio_skip(pb, 616); // Binning .. bFlipH if (!avio_rl32(pb) ^ vflip) { - st->codec->extradata = av_strdup("BottomUp"); - st->codec->extradata_size = 9; + st->codecpar->extradata = av_strdup("BottomUp"); + st->codecpar->extradata_size = 9; } avio_skip(pb, 4); // Grid @@ -193,17 +193,17 @@ static int cine_read_header(AVFormatContext *avctx) set_metadata_float(&st->metadata, "wbgain[0].b", av_int2float(avio_rl32(pb)), 1); avio_skip(pb, 36); // WBGain[1].. WBView - st->codec->bits_per_coded_sample = avio_rl32(pb); + st->codecpar->bits_per_coded_sample = avio_rl32(pb); if (compression == CC_RGB) { if (biBitCount == 8) { - st->codec->pix_fmt = AV_PIX_FMT_GRAY8; + st->codecpar->format = AV_PIX_FMT_GRAY8; } else if (biBitCount == 16) { - st->codec->pix_fmt = AV_PIX_FMT_GRAY16LE; + st->codecpar->format = AV_PIX_FMT_GRAY16LE; } else if (biBitCount == 24) { - st->codec->pix_fmt = AV_PIX_FMT_BGR24; + st->codecpar->format = AV_PIX_FMT_BGR24; } else if (biBitCount == 48) { - st->codec->pix_fmt = AV_PIX_FMT_BGR48LE; + st->codecpar->format = AV_PIX_FMT_BGR48LE; } else { avpriv_request_sample(avctx, "unsupported biBitCount %i", biBitCount); return AVERROR_INVALIDDATA; @@ -212,9 +212,9 @@ static int cine_read_header(AVFormatContext *avctx) switch (CFA & 0xFFFFFF) { case CFA_BAYER: if (biBitCount == 8) { - st->codec->pix_fmt = AV_PIX_FMT_BAYER_GBRG8; + st->codecpar->format = AV_PIX_FMT_BAYER_GBRG8; } else if (biBitCount == 16) { - st->codec->pix_fmt = AV_PIX_FMT_BAYER_GBRG16LE; + st->codecpar->format = AV_PIX_FMT_BAYER_GBRG16LE; } else { avpriv_request_sample(avctx, "unsupported biBitCount %i", biBitCount); return AVERROR_INVALIDDATA; @@ -222,9 +222,9 @@ static int cine_read_header(AVFormatContext *avctx) break; case CFA_BAYERFLIP: if (biBitCount == 8) { - st->codec->pix_fmt = AV_PIX_FMT_BAYER_RGGB8; + st->codecpar->format = AV_PIX_FMT_BAYER_RGGB8; } else if (biBitCount == 16) { - st->codec->pix_fmt = AV_PIX_FMT_BAYER_RGGB16LE; + st->codecpar->format = AV_PIX_FMT_BAYER_RGGB16LE; } else { avpriv_request_sample(avctx, "unsupported biBitCount %i", biBitCount); return AVERROR_INVALIDDATA; |