static int check_image_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt,
                                const int linesizes[4])
{
    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
    int i;
    for (i = 0; i < 4; i++) {
        int plane = desc->comp[i].plane;
        if (!data[plane] || !linesizes[plane])
            return 0;
    }
    return 1;
}
['static int check_image_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt,\n                                const int linesizes[4])\n{\n    const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);\n    int i;\n    for (i = 0; i < 4; i++) {\n        int plane = desc->comp[i].plane;\n        if (!data[plane] || !linesizes[plane])\n            return 0;\n    }\n    return 1;\n}', 'const AVPixFmtDescriptor *av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)\n{\n    if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB)\n        return NULL;\n    return &av_pix_fmt_descriptors[pix_fmt];\n}']