diff options
author | Andy Walls <awalls@radix.net> | 2009-03-15 02:03:26 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-03-30 19:43:28 +0400 |
commit | 6e1a63720228ef7fc3bd00b04dfb608064fbab4e (patch) | |
tree | 967cb8d64788393ea40c5ccef5ad4bc8760b6910 /drivers/media/video | |
parent | baadd7925c98968c94e9657272d91957a3ad0a41 (diff) | |
download | linux-6e1a63720228ef7fc3bd00b04dfb608064fbab4e.tar.xz |
V4L/DVB (11091): cx18, ivtv: Ensure endianess for linemasks in VBI embedded in MPEG stream
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.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/cx18/cx18-vbi.c | 2 | ||||
-rw-r--r-- | drivers/media/video/ivtv/ivtv-vbi.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-vbi.c b/drivers/media/video/cx18/cx18-vbi.c index 355737bff13e..99f9b2c86b0c 100644 --- a/drivers/media/video/cx18/cx18-vbi.c +++ b/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/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c index 5c5d1c462fef..f420d31b937d 100644 --- a/drivers/media/video/ivtv/ivtv-vbi.c +++ b/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); } |