summaryrefslogtreecommitdiff
path: root/libavcodec/libtheoraenc.c
diff options
context:
space:
mode:
authorMartin Vignali <martin.vignali@gmail.com>2017-11-06 22:39:16 +0100
committerJames Almer <jamrial@gmail.com>2017-11-06 19:13:03 -0300
commit4ada428aae2f4ab42c6cebc0d7591c0e62db6fe2 (patch)
tree64ff90f19d094203be823c34caf0da5e8390eb61 /libavcodec/libtheoraenc.c
parent7d1c79f533e0c80cbcda60d3cbd8216551a1bac5 (diff)
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/libtheoraenc.c')
-rw-r--r--libavcodec/libtheoraenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index fae55e8f23..d4c39283a6 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -208,7 +208,9 @@ static av_cold int encode_init(AVCodecContext* avc_context)
av_log(avc_context, AV_LOG_ERROR, "Unsupported pix_fmt\n");
return AVERROR(EINVAL);
}
- avcodec_get_chroma_sub_sample(avc_context->pix_fmt, &h->uv_hshift, &h->uv_vshift);
+ ret = av_pix_fmt_get_chroma_sub_sample(avc_context->pix_fmt, &h->uv_hshift, &h->uv_vshift);
+ if (ret)
+ return ret;
if (avc_context->flags & AV_CODEC_FLAG_QSCALE) {
/* Clip global_quality in QP units to the [0 - 10] range