[FFmpeg-cvslog] avcodec/pnm: disable check for PFM as it is not needed

Paul B Mahol git at videolan.org
Sun Jan 31 15:06:49 EET 2021


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Sun Jan 31 14:04:51 2021 +0100| [47be08640cfabecbe277306a23a2f45503ca6d5b] | committer: Paul B Mahol

avcodec/pnm: disable check for PFM as it is not needed

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=47be08640cfabecbe277306a23a2f45503ca6d5b
---

 libavcodec/pnm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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);



More information about the ffmpeg-cvslog mailing list