]> git.sesse.net Git - ffmpeg/commitdiff
avcodec/pnm: disable check for PFM as it is not needed
authorPaul B Mahol <onemda@gmail.com>
Sun, 31 Jan 2021 13:04:51 +0000 (14:04 +0100)
committerPaul B Mahol <onemda@gmail.com>
Sun, 31 Jan 2021 13:06:07 +0000 (14:06 +0100)
libavcodec/pnm.c

index aad23c7ae2806d4c66ed07f02f7ebbe9e15fa954..94ae74e13a148e783bbb6cede662b696ff3740e1 100644 (file)
@@ -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);