]> git.sesse.net Git - ffmpeg/commitdiff
libavcodec/pgxdec Fix pix format selection error
authorGautam Ramakrishnan <gautamramk@gmail.com>
Wed, 29 Jul 2020 15:49:11 +0000 (21:19 +0530)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 29 Jul 2020 22:23:45 +0000 (00:23 +0200)
This patch makes the pgx decoder select the correct
byte order instead of selecting big endian format for
16 bit images.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/pgxdec.c

index 93b9f4e7a074be0b05155f1a6f355d5d8d18b7ff..a72d6fe6fe57a02098059c5295dbe8b105aabc25 100644 (file)
@@ -137,7 +137,7 @@ static int pgx_decode_frame(AVCodecContext *avctx, void *data,
         avctx->pix_fmt = AV_PIX_FMT_GRAY8;
         bpp = 8;
     } else if (depth <= 16) {
-        avctx->pix_fmt = AV_PIX_FMT_GRAY16BE;
+        avctx->pix_fmt = AV_PIX_FMT_GRAY16;
         bpp = 16;
     } else {
         av_log(avctx, AV_LOG_ERROR, "Maximum depth of 16 bits supported.\n");