diff options
author | Martin Vignali <martin.vignali@gmail.com> | 2017-11-06 22:39:16 +0100 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2017-11-06 19:13:03 -0300 |
commit | 4ada428aae2f4ab42c6cebc0d7591c0e62db6fe2 (patch) | |
tree | 64ff90f19d094203be823c34caf0da5e8390eb61 /libavcodec/vc2enc.c | |
parent | 7d1c79f533e0c80cbcda60d3cbd8216551a1bac5 (diff) | |
download | ffmpeg-4ada428aae2f4ab42c6cebc0d7591c0e62db6fe2.tar.gz |
avcodec: remove remaining uses of avcodec_get_chroma_sub_sample
Replace them with av_pix_fmt_get_chroma_sub_sample.
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/vc2enc.c')
-rw-r--r-- | libavcodec/vc2enc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 96e27d93ed..fa4ff54a3c 100644 --- a/libavcodec/vc2enc.c +++ b/libavcodec/vc2enc.c @@ -1063,7 +1063,7 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) { Plane *p; SubBand *b; - int i, j, level, o, shift; + int i, j, level, o, shift, ret; const AVPixFmtDescriptor *fmt = av_pix_fmt_desc_get(avctx->pix_fmt); const int depth = fmt->comp[0].depth; VC2EncContext *s = avctx->priv_data; @@ -1138,7 +1138,9 @@ static av_cold int vc2_encode_init(AVCodecContext *avctx) } /* Chroma subsampling */ - avcodec_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_x_shift, &s->chroma_y_shift); + ret = av_pix_fmt_get_chroma_sub_sample(avctx->pix_fmt, &s->chroma_x_shift, &s->chroma_y_shift); + if (ret) + return ret; /* Bit depth and color range index */ if (depth == 8 && avctx->color_range == AVCOL_RANGE_JPEG) { |