diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index 3e1cea6..9a0a738 100644
|
a
|
b
|
static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
|
| 93 | 93 | avctx->pix_fmt = PIX_FMT_MONOWHITE; |
| 94 | 94 | break; |
| 95 | 95 | case 8: |
| 96 | | avctx->pix_fmt = PIX_FMT_PAL8; |
| | 96 | avctx->pix_fmt = maplength ? PIX_FMT_PAL8 : PIX_FMT_GRAY8; |
| 97 | 97 | break; |
| 98 | 98 | case 24: |
| 99 | 99 | avctx->pix_fmt = (type == RT_FORMAT_RGB) ? PIX_FMT_RGB24 : PIX_FMT_BGR24; |
| … |
… |
static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
|
| 121 | 121 | if (depth != 8 && maplength) { |
| 122 | 122 | av_log(avctx, AV_LOG_WARNING, "useless colormap found or file is corrupted, trying to recover\n"); |
| 123 | 123 | |
| 124 | | } else if (depth == 8) { |
| | 124 | } else if (maplength) { |
| 125 | 125 | unsigned int len = maplength / 3; |
| 126 | 126 | |
| 127 | 127 | if (!maplength) { |