summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2009-03-14 19:03:26 -0400
committerAndy Walls <awalls@radix.net>2009-03-14 19:03:26 -0400
commite78f2286ef0ab031e5141669487b2c6a90178eb9 (patch)
tree4be250438bd2c4b4cf5a3e067e899d6fea79ceec /linux/drivers/media/video
parent823c2d8d6994da5af8399edffb4472992c90b62e (diff)
downloadmediapointer-dvb-s2-e78f2286ef0ab031e5141669487b2c6a90178eb9.tar.gz
mediapointer-dvb-s2-e78f2286ef0ab031e5141669487b2c6a90178eb9.tar.bz2
cx18, ivtv: Ensure endianess for linemasks in VBI embedded in MPEG stream
From: Andy Walls <awalls@radix.net> 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 <awalls@radix.net>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx18/cx18-vbi.c2
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-vbi.c2
2 files changed, 4 insertions, 0 deletions
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);
}
diff --git a/linux/drivers/media/video/ivtv/ivtv-vbi.c b/linux/drivers/media/video/ivtv/ivtv-vbi.c
index 5c5d1c462..f420d31b9 100644
--- a/linux/drivers/media/video/ivtv/ivtv-vbi.c
+++ b/linux/drivers/media/video/ivtv/ivtv-vbi.c
@@ -185,6 +185,8 @@ static void copy_vbi_data(struct ivtv *itv, 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);
}