summaryrefslogtreecommitdiff
path: root/drivers/staging/media/go7007
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2013-03-17 10:11:32 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-24 12:59:58 -0300
commitac41fa2a41ba2eb224c982c2c8849169aca6310f (patch)
tree5791d302a426c0af8273ad56de511013f200f813 /drivers/staging/media/go7007
parent778ca511537da58d9154ab8e1c1f0d1bf738aec8 (diff)
[media] go7007: correct a header check: MPEG4 has a different GOP code
Actually it's called "Group of VOP" start code in MPEG4 terminology. Taken from the 0.9.8-5 version of the out-of-tree wis-go7007 driver. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging/media/go7007')
-rw-r--r--drivers/staging/media/go7007/go7007-driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c
index 4378223d8bb8..3c0b2585ad73 100644
--- a/drivers/staging/media/go7007/go7007-driver.c
+++ b/drivers/staging/media/go7007/go7007-driver.c
@@ -435,16 +435,18 @@ static void write_bitmap_word(struct go7007 *go)
void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length)
{
struct go7007_buffer *vb = go->active_buf;
- int i, seq_start_code = -1, frame_start_code = -1;
+ int i, seq_start_code = -1, gop_start_code = -1, frame_start_code = -1;
switch (go->format) {
case V4L2_PIX_FMT_MPEG4:
seq_start_code = 0xB0;
+ gop_start_code = 0xB3;
frame_start_code = 0xB6;
break;
case V4L2_PIX_FMT_MPEG1:
case V4L2_PIX_FMT_MPEG2:
seq_start_code = 0xB3;
+ gop_start_code = 0xB8;
frame_start_code = 0x00;
break;
}
@@ -526,7 +528,7 @@ void go7007_parse_video_stream(struct go7007 *go, u8 *buf, int length)
go->format == V4L2_PIX_FMT_MPEG2 ||
go->format == V4L2_PIX_FMT_MPEG4) &&
(buf[i] == seq_start_code ||
- buf[i] == 0xB8 || /* GOP code */
+ buf[i] == gop_start_code ||
buf[i] == frame_start_code)) {
if (vb == NULL || go->seen_frame)
vb = frame_boundary(go, vb);