Revision b2eef2f0 libavcodec/tscc.c

View differences:

libavcodec/tscc.c
116 116
	    }
117 117
            pos += p2;
118 118
        } else { //Run of pixels
119
            int pix[3]; //original pixel
119
            int pix[4]; //original pixel
120 120
            switch(c->bpp){
121 121
            case  8: pix[0] = *src++;
122 122
                     break;
......
127 127
                     pix[1] = *src++;
128 128
                     pix[2] = *src++;
129 129
                     break;
130
            case 32: pix[0] = *src++;
131
                     pix[1] = *src++;
132
                     pix[2] = *src++;
133
                     pix[3] = *src++;
134
                     break;
130 135
            }
131 136
            if (output + p1 * (c->bpp / 8) > output_end)
132 137
                continue;
......
141 146
                         *output++ = pix[1];
142 147
                         *output++ = pix[2];
143 148
                         break;
149
                case 32: *output++ = pix[0];
150
                         *output++ = pix[1];
151
                         *output++ = pix[2];
152
                         *output++ = pix[3];
153
                         break;
144 154
                }
145 155
            }
146 156
            pos += p1;
......
252 262
    switch(avctx->bits_per_sample){
253 263
    case  8: avctx->pix_fmt = PIX_FMT_PAL8; break;
254 264
    case 16: avctx->pix_fmt = PIX_FMT_RGB555; break;
255
    case 24: av_log(avctx, AV_LOG_ERROR, "Camtasia warning: RGB24 is just guessed\n");
265
    case 24:
256 266
             avctx->pix_fmt = PIX_FMT_BGR24;
257 267
             break;
268
    case 32: avctx->pix_fmt = PIX_FMT_RGBA32; break;
258 269
    default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_sample);
259 270
             return -1;             
260 271
    }

Also available in: Unified diff