summaryrefslogtreecommitdiff
path: root/libavcodec/pnm.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2021-01-31 14:04:51 +0100
committerPaul B Mahol <onemda@gmail.com>2021-01-31 14:06:07 +0100
commit47be08640cfabecbe277306a23a2f45503ca6d5b (patch)
tree42771ecfd92f710d18a1c275b463f8a4c027072f /libavcodec/pnm.c
parentd16b0a4bf0830db852ce404210e293f6ae26559f (diff)
avcodec/pnm: disable check for PFM as it is not needed
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r--libavcodec/pnm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c
index aad23c7ae2..94ae74e13a 100644
--- a/libavcodec/pnm.c
+++ b/libavcodec/pnm.c
@@ -218,7 +218,8 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s)
return AVERROR_INVALIDDATA;
/* more check if YUV420 */
- if (av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) {
+ if ((av_pix_fmt_desc_get(avctx->pix_fmt)->flags & AV_PIX_FMT_FLAG_PLANAR) &&
+ avctx->pix_fmt != AV_PIX_FMT_GBRPF32) {
if ((avctx->width & 1) != 0)
return AVERROR_INVALIDDATA;
h = (avctx->height * 2);