Revision 384f26f4

View differences:

libavcodec/sunrast.c
64 64
    maptype   = AV_RB32(buf+24);
65 65
    maplength = AV_RB32(buf+28);
66 66

  
67
    if (type > RT_BYTE_ENCODED && type <= RT_FORMAT_IFF) {
67
    if (type == RT_FORMAT_TIFF || type == RT_FORMAT_IFF) {
68 68
        av_log(avctx, AV_LOG_ERROR, "unsupported (compression) type\n");
69 69
        return -1;
70 70
    }
......
87 87
            avctx->pix_fmt = PIX_FMT_PAL8;
88 88
            break;
89 89
        case 24:
90
            avctx->pix_fmt = PIX_FMT_BGR24;
90
            avctx->pix_fmt = (type == RT_FORMAT_RGB) ? PIX_FMT_RGB24 : PIX_FMT_BGR24;
91 91
            break;
92 92
        default:
93 93
            av_log(avctx, AV_LOG_ERROR, "invalid depth\n");

Also available in: Unified diff