Unified · Split
| @@ -218,7 +218,8 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 217 unmodified lines | ||
| 218 | 218 | return AVERROR_INVALIDDATA; |
| 219 | 219 | |
| 220 | 220 | /* more check if YUV420 */ |
| 221 | − if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) { | |
| 221 | + if ((av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) && | |
| 222 | + avctx->pix_fmt != AV_PIX_FMT_GBRPF32) { | |
| 222 | 223 | if ((avctx->width & 1) != 0) |
| 223 | 224 | return AVERROR_INVALIDDATA; |
| 224 | 225 | h = (avctx->height * 2); |