On 3/20/12, Ronald S. Bultje <[email protected]> wrote:
> Hi,
>
> On Sun, Mar 18, 2012 at 8:50 PM, Ronald S. Bultje <[email protected]>
> wrote:
>> +        case 32: {
>>             for(i = 0; i < avctx->height; i++){
>> -                const uint8_t *src = buf;
>> +                const uint8_t *src = gb.buffer;

Huh, how I could not notice this. accessing buffer directly is unacceptable.
>>                 uint8_t *dst = ptr;
>>
>>                 for(j = 0; j < avctx->width; j++){
>> @@ -330,13 +311,14 @@ static int bmp_decode_frame(AVCodecContext *avctx,
>>                     dst[1] = src[rgb[1]];
>>                     dst[2] = src[rgb[0]];
>>                     dst += 3;
>> -                    src += 4;
>> +                    bytestream2_skipu(&gb, 4);
>>                 }
>>
>> -                buf += n;
>> +                bytestream2_skipu(&gb, n);
>>                 ptr += linesize;
>>             }
>>             break;
>> +        }
>
> This probably isn't correct, I'm skipping 4*width+n, I should skip n
> or 4*width+padding, where padding is n-4*width. Will send a new patch
> later.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to