diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-vbi.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-vbi.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/media/video/cx18/cx18-vbi.c b/drivers/media/video/cx18/cx18-vbi.c index 52082d4a179e..8e6f4d4aff9a 100644 --- a/drivers/media/video/cx18/cx18-vbi.c +++ b/drivers/media/video/cx18/cx18-vbi.c | |||
@@ -221,13 +221,22 @@ void cx18_process_vbi_data(struct cx18 *cx, struct cx18_buffer *buf, | |||
221 | 221 | ||
222 | pts = (be32_to_cpu(q[0] == 0x3fffffff)) ? be32_to_cpu(q[2]) : 0; | 222 | pts = (be32_to_cpu(q[0] == 0x3fffffff)) ? be32_to_cpu(q[2]) : 0; |
223 | 223 | ||
224 | /* | ||
225 | * For calls to compress_sliced_buf(), ensure there are an integral | ||
226 | * number of lines by shifting the real data up over the 12 bytes header | ||
227 | * that got stuffed in. | ||
228 | * FIXME - there's a smarter way to do this with pointers, but for some | ||
229 | * reason I can't get it to work correctly right now. | ||
230 | */ | ||
231 | memcpy(p, &buf->buf[12], size-12); | ||
232 | |||
224 | /* first field */ | 233 | /* first field */ |
225 | /* compress_sliced_buf() will skip the 12 bytes of header */ | ||
226 | lines = compress_sliced_buf(cx, 0, p, size / 2, sliced_vbi_eav_rp[0]); | 234 | lines = compress_sliced_buf(cx, 0, p, size / 2, sliced_vbi_eav_rp[0]); |
227 | /* second field */ | 235 | /* |
228 | /* experimentation shows that the second half does not always | 236 | * second field |
229 | begin at the exact address. So start a bit earlier | 237 | * In case the second half does not always begin at the exact address, |
230 | (hence 32). */ | 238 | * start a bit earlier (hence 32). |
239 | */ | ||
231 | lines = compress_sliced_buf(cx, lines, p + size / 2 - 32, | 240 | lines = compress_sliced_buf(cx, lines, p + size / 2 - 32, |
232 | size / 2 + 32, sliced_vbi_eav_rp[1]); | 241 | size / 2 + 32, sliced_vbi_eav_rp[1]); |
233 | /* always return at least one empty line */ | 242 | /* always return at least one empty line */ |