diff options
-rw-r--r-- | drivers/staging/go7007/go7007-driver.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/staging/go7007/go7007-driver.c b/drivers/staging/go7007/go7007-driver.c index 372a7c6791ca..b8ecbd889761 100644 --- a/drivers/staging/go7007/go7007-driver.c +++ b/drivers/staging/go7007/go7007-driver.c | |||
@@ -393,7 +393,8 @@ static void write_bitmap_word(struct go7007 *go) | |||
393 | for (i = 0; i < 16; ++i) { | 393 | for (i = 0; i < 16; ++i) { |
394 | y = (((go->parse_length - 1) << 3) + i) / (go->width >> 4); | 394 | y = (((go->parse_length - 1) << 3) + i) / (go->width >> 4); |
395 | x = (((go->parse_length - 1) << 3) + i) % (go->width >> 4); | 395 | x = (((go->parse_length - 1) << 3) + i) % (go->width >> 4); |
396 | go->active_map[stride * y + (x >> 3)] |= | 396 | if (stride * y + (x >> 3) < sizeof(go->active_map)) |
397 | go->active_map[stride * y + (x >> 3)] |= | ||
397 | (go->modet_word & 1) << (x & 0x7); | 398 | (go->modet_word & 1) << (x & 0x7); |
398 | go->modet_word >>= 1; | 399 | go->modet_word >>= 1; |
399 | } | 400 | } |
@@ -485,6 +486,15 @@ void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length) | |||
485 | } | 486 | } |
486 | break; | 487 | break; |
487 | case STATE_00_00_01: | 488 | case STATE_00_00_01: |
489 | if (buf[i] == 0xF8 && go->modet_enable == 0) { | ||
490 | /* MODET start code, but MODET not enabled */ | ||
491 | store_byte(go->active_buf, 0x00); | ||
492 | store_byte(go->active_buf, 0x00); | ||
493 | store_byte(go->active_buf, 0x01); | ||
494 | store_byte(go->active_buf, 0xF8); | ||
495 | go->state = STATE_DATA; | ||
496 | break; | ||
497 | } | ||
488 | /* If this is the start of a new MPEG frame, | 498 | /* If this is the start of a new MPEG frame, |
489 | * get a new buffer */ | 499 | * get a new buffer */ |
490 | if ((go->format == GO7007_FORMAT_MPEG1 || | 500 | if ((go->format == GO7007_FORMAT_MPEG1 || |