]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/libtheoraenc.c
avcodec: remove remaining uses of avcodec_get_chroma_sub_sample
[ffmpeg] / libavcodec / libtheoraenc.c
index fae55e8f23b022467311b69ae10c3c7c58f0fedb..d4c39283a60c8997cdb7f82cf09d3479189e3790 100644 (file)
@@ -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