case 1:
for (i = 0; i < avctx->height; i++) {
int j;
- for (j = 0; j < n; j++) {
+ for (j = 0; j < avctx->width >> 3; j++) {
ptr[j*8+0] = buf[j] >> 7;
ptr[j*8+1] = (buf[j] >> 6) & 1;
ptr[j*8+2] = (buf[j] >> 5) & 1;
ptr[j*8+6] = (buf[j] >> 1) & 1;
ptr[j*8+7] = buf[j] & 1;
}
+ for (j = 0; j < (avctx->width & 7); j++) {
+ ptr[avctx->width - (avctx->width & 7) + j] = buf[avctx->width >> 3] >> (7 - j) & 1;
+ }
buf += n;
ptr += linesize;
}
return buf_size;
}
-AVCodec ff_bmp_decoder = {
+const AVCodec ff_bmp_decoder = {
.name = "bmp",
.long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"),
.type = AVMEDIA_TYPE_VIDEO,