Revision 0a1e1510

View differences:

libavcodec/rawdec.c
118 118
    if(avctx->bits_per_coded_sample == 4 && avctx->pix_fmt==PIX_FMT_PAL8 &&
119 119
       (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){
120 120
        int i;
121
        for(i=256*2; i+1 < context->length>>1; i++){
122
            context->buffer[2*i+0]= buf[i-256*2]>>4;
123
            context->buffer[2*i+1]= buf[i-256*2]&15;
121
        uint8_t *dst = context->buffer + 256*4;
122
        buf_size = context->length - 256*4;
123
        for(i=0; 2*i+1 < buf_size; i++){
124
            dst[2*i+0]= buf[i]>>4;
125
            dst[2*i+1]= buf[i]&15;
124 126
        }
125
        buf= context->buffer + 256*4;
126
        buf_size= context->length - 256*4;
127
        buf= dst;
127 128
    }
128 129

  
129 130
    if(buf_size < context->length - (avctx->pix_fmt==PIX_FMT_PAL8 ? 256*4 : 0))

Also available in: Unified diff