pnm: Use av_pix_fmt_desc_get instead of accessing the array directly