From 5383305a30638d2915f8b14fbbfc854781280924 Mon Sep 17 00:00:00 2001 From: Pete Eberlein Date: Thu, 23 Sep 2010 14:43:41 -0300 Subject: [PATCH] --- yaml --- r: 219235 b: refs/heads/master c: a716e9d75f04ff71fb5e391a7a189b6f1b032bbc h: refs/heads/master i: 219233: 5a8f6b461d1a84607b8cbbc5b2b0412e98063ce2 219231: 2bf085af164d77f0674738e952c04e421cc87fd5 v: v3 --- [refs] | 2 +- trunk/drivers/staging/go7007/go7007-driver.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index aea429f61c2d..d0dc9f5d827f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 94d4350c544066d590eee93582220128e8be8b1c +refs/heads/master: a716e9d75f04ff71fb5e391a7a189b6f1b032bbc diff --git a/trunk/drivers/staging/go7007/go7007-driver.c b/trunk/drivers/staging/go7007/go7007-driver.c index 372a7c6791ca..b8ecbd889761 100644 --- a/trunk/drivers/staging/go7007/go7007-driver.c +++ b/trunk/drivers/staging/go7007/go7007-driver.c @@ -393,7 +393,8 @@ static void write_bitmap_word(struct go7007 *go) for (i = 0; i < 16; ++i) { y = (((go->parse_length - 1) << 3) + i) / (go->width >> 4); x = (((go->parse_length - 1) << 3) + i) % (go->width >> 4); - go->active_map[stride * y + (x >> 3)] |= + if (stride * y + (x >> 3) < sizeof(go->active_map)) + go->active_map[stride * y + (x >> 3)] |= (go->modet_word & 1) << (x & 0x7); go->modet_word >>= 1; } @@ -485,6 +486,15 @@ void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length) } break; case STATE_00_00_01: + if (buf[i] == 0xF8 && go->modet_enable == 0) { + /* MODET start code, but MODET not enabled */ + store_byte(go->active_buf, 0x00); + store_byte(go->active_buf, 0x00); + store_byte(go->active_buf, 0x01); + store_byte(go->active_buf, 0xF8); + go->state = STATE_DATA; + break; + } /* If this is the start of a new MPEG frame, * get a new buffer */ if ((go->format == GO7007_FORMAT_MPEG1 ||