From e78f2286ef0ab031e5141669487b2c6a90178eb9 Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sat, 14 Mar 2009 19:03:26 -0400 Subject: cx18, ivtv: Ensure endianess for linemasks in VBI embedded in MPEG stream From: Andy Walls The sliced VBI payloads that cx18 and ivtv would insert in the MPEG stream did not have consistent endianess for the linemasks in the payload (a big endian platform would write them out big endian). This change ensures the linemasks are always stored as little-endian in the MPEG stream to ensure cross platform consistency in parsing the generated MPEG stream. Priority: normal Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-vbi.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/drivers/media/video/cx18') diff --git a/linux/drivers/media/video/cx18/cx18-vbi.c b/linux/drivers/media/video/cx18/cx18-vbi.c index 355737bff..99f9b2c86 100644 --- a/linux/drivers/media/video/cx18/cx18-vbi.c +++ b/linux/drivers/media/video/cx18/cx18-vbi.c @@ -88,6 +88,8 @@ static void copy_vbi_data(struct cx18 *cx, int lines, u32 pts_stamp) size = 4 + ((43 * line + 3) & ~3); } else { memcpy(dst + sd, "itv0", 4); + cpu_to_le32s(&linemask[0]); + cpu_to_le32s(&linemask[1]); memcpy(dst + sd + 4, &linemask[0], 8); size = 12 + ((43 * line + 3) & ~3); } -- cgit v1.2.3