diff options
Diffstat (limited to 'libavcodec/sgidec.c')
-rw-r--r-- | libavcodec/sgidec.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c index dfa00ed79f..6a98718131 100644 --- a/libavcodec/sgidec.c +++ b/libavcodec/sgidec.c @@ -2,24 +2,25 @@ * SGI image decoder * Todd Kirby <doubleshot@pacbell.net> * - * This file is part of Libav. + * This file is part of FFmpeg. * - * Libav is free software; you can redistribute it and/or + * FFmpeg is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * - * Libav is distributed in the hope that it will be useful, + * FFmpeg is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software + * License along with FFmpeg; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "libavutil/imgutils.h" +#include "libavutil/avassert.h" #include "avcodec.h" #include "bytestream.h" #include "sgi.h" @@ -194,8 +195,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; |