]> git.sesse.net Git - ffmpeg/blobdiff - libavfilter/vf_drawbox.c
libavfilter: include needed header for AVDictionary
[ffmpeg] / libavfilter / vf_drawbox.c
index 94e573cb5fb3091cd554474e532418884e55d670..8e2b48e338d0198b122f2140f1e75b6a60907e8a 100644 (file)
@@ -81,9 +81,10 @@ static int query_formats(AVFilterContext *ctx)
 static int config_input(AVFilterLink *inlink)
 {
     DrawBoxContext *drawbox = inlink->dst->priv;
+    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
 
-    drawbox->hsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_w;
-    drawbox->vsub = av_pix_fmt_descriptors[inlink->format].log2_chroma_h;
+    drawbox->hsub = desc->log2_chroma_w;
+    drawbox->vsub = desc->log2_chroma_h;
 
     if (drawbox->w == 0) drawbox->w = inlink->w;
     if (drawbox->h == 0) drawbox->h = inlink->h;