aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sgidec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-01-14 01:14:51 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2012-01-14 01:14:51 +0100
commit0b1f20e23c3d61d06c86ee1aa160cd4da8b47b0c (patch)
tree4c6cf9f6841c7111de22cab75984da989a527c28 /libavcodec/sgidec.c
parent3fe4540b0856438706553a511b43a8389dc07acb (diff)
downloadandroid_external_ffmpeg-0b1f20e23c3d61d06c86ee1aa160cd4da8b47b0c.tar.gz
android_external_ffmpeg-0b1f20e23c3d61d06c86ee1aa160cd4da8b47b0c.tar.bz2
android_external_ffmpeg-0b1f20e23c3d61d06c86ee1aa160cd4da8b47b0c.zip
Support reading 64bit sgi images.
Reviewed-by: Jean First
Diffstat (limited to 'libavcodec/sgidec.c')
-rw-r--r--libavcodec/sgidec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index 98327a86a9..b84949daff 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -208,8 +208,8 @@ static int decode_frame(AVCodecContext *avctx,
avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_GRAY16BE : PIX_FMT_GRAY8;
} else if (s->depth == SGI_RGB) {
avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGB48BE : PIX_FMT_RGB24;
- } else if (s->depth == SGI_RGBA && s->bytes_per_channel == 1) {
- avctx->pix_fmt = PIX_FMT_RGBA;
+ } else if (s->depth == SGI_RGBA) {
+ avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGBA64BE : PIX_FMT_RGBA;
} else {
av_log(avctx, AV_LOG_ERROR, "wrong picture format\n");
return -1;