diff --git a/libavcodec/sunrast.c b/libavcodec/sunrast.c
index 3e1cea6..64793db 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 | /* |
| | 97 | if(!grayscale) |
| | 98 | avctx->pix_fmt = PIX_FMT_PAL8; |
| | 99 | else |
| | 100 | */ |
| | 101 | avctx->pix_fmt = PIX_FMT_GRAY8; |
| 97 | 102 | break; |
| 98 | 103 | case 24: |
| 99 | 104 | avctx->pix_fmt = (type == RT_FORMAT_RGB) ? PIX_FMT_RGB24 : PIX_FMT_BGR24; |
| … |
… |
static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
|
| 121 | 126 | if (depth != 8 && maplength) { |
| 122 | 127 | av_log(avctx, AV_LOG_WARNING, "useless colormap found or file is corrupted, trying to recover\n"); |
| 123 | 128 | |
| 124 | | } else if (depth == 8) { |
| 125 | | unsigned int len = maplength / 3; |
| | 129 | } else if (depth == 8 /*&& !grayscale */) { |
| | 130 | /* unsigned int len = maplength / 3; |
| 126 | 131 | |
| 127 | 132 | if (!maplength) { |
| 128 | 133 | av_log(avctx, AV_LOG_ERROR, "colormap expected\n"); |
| … |
… |
static int sunrast_decode_frame(AVCodecContext *avctx, void *data,
|
| 136 | 141 | ptr = p->data[1]; |
| 137 | 142 | for (x=0; x<len; x++, ptr+=4) |
| 138 | 143 | *(uint32_t *)ptr = (0xFF<<24) + (buf[x]<<16) + (buf[len+x]<<8) + buf[len+len+x]; |
| | 144 | */ |
| 139 | 145 | } |
| 140 | 146 | |
| 141 | 147 | buf += maplength; |