diff options
author | ami_stuff <ami_stuff@o2.pl> | 2012-01-06 01:25:54 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-06 01:25:54 +0100 |
commit | febf75f3d2e4335652e6e40ef3427ec019d45aa8 (patch) | |
tree | c5c57f44d77d3644d7256a16426716ebcf25f12b /libavcodec/pnm.c | |
parent | 09f25a9cb08ddf39dcb16898c36ed793006093fd (diff) | |
download | ffmpeg-febf75f3d2e4335652e6e40ef3427ec019d45aa8.tar.gz |
pam: Reject 64bpp rgba.
Fixes ticket #883
Diffstat (limited to 'libavcodec/pnm.c')
-rw-r--r-- | libavcodec/pnm.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavcodec/pnm.c b/libavcodec/pnm.c index 791829b737..ac451ca5ed 100644 --- a/libavcodec/pnm.c +++ b/libavcodec/pnm.c @@ -125,7 +125,12 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) avctx->pix_fmt = PIX_FMT_RGB48BE; } } else if (depth == 4) { - avctx->pix_fmt = PIX_FMT_RGB32; + if (maxval < 256) { + avctx->pix_fmt = PIX_FMT_RGB32; + } else { + av_log(avctx, AV_LOG_ERROR, "Unsupported bit depth\n"); + return -1; + } } else { return -1; } |