diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2012-01-14 01:14:51 +0100 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-04-01 01:19:03 +0200 |
commit | f8dea10d3f09376894613d0266c34d1a16ac735f (patch) | |
tree | c6aeec3d8e30c233ce19c73a098dbe92d4191f7a /libavcodec/sgidec.c | |
parent | ab7c64624a1254d509b71c2a4945336567e93845 (diff) | |
download | ffmpeg-f8dea10d3f09376894613d0266c34d1a16ac735f.tar.gz |
sgi: decode images with 4 channels at 8 and 16 bits
Diffstat (limited to 'libavcodec/sgidec.c')
-rw-r--r-- | libavcodec/sgidec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c index 04cfcd0353..357d54e743 100644 --- a/libavcodec/sgidec.c +++ b/libavcodec/sgidec.c @@ -198,8 +198,8 @@ static int decode_frame(AVCodecContext *avctx, avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_GRAY16BE : AV_PIX_FMT_GRAY8; } else if (s->depth == SGI_RGB) { avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_RGB48BE : AV_PIX_FMT_RGB24; - } else if (s->depth == SGI_RGBA && s->bytes_per_channel == 1) { - avctx->pix_fmt = AV_PIX_FMT_RGBA; + } else if (s->depth == SGI_RGBA) { + avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_RGBA64BE : AV_PIX_FMT_RGBA; } else { av_log(avctx, AV_LOG_ERROR, "wrong picture format\n"); return -1; |