aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-vbi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-vbi.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-vbi.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtv-vbi.c b/drivers/media/video/ivtv/ivtv-vbi.c
index 71798f0da27f..1ce9deb1104f 100644
--- a/drivers/media/video/ivtv/ivtv-vbi.c
+++ b/drivers/media/video/ivtv/ivtv-vbi.c
@@ -293,6 +293,7 @@ static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8
293 u32 line_size = itv->vbi.sliced_decoder_line_size; 293 u32 line_size = itv->vbi.sliced_decoder_line_size;
294 struct v4l2_decode_vbi_line vbi; 294 struct v4l2_decode_vbi_line vbi;
295 int i; 295 int i;
296 unsigned lines = 0;
296 297
297 /* find the first valid line */ 298 /* find the first valid line */
298 for (i = 0; i < size; i++, buf++) { 299 for (i = 0; i < size; i++, buf++) {
@@ -313,7 +314,8 @@ static u32 compress_sliced_buf(struct ivtv *itv, u32 line, u8 *buf, u32 size, u8
313 } 314 }
314 vbi.p = p + 4; 315 vbi.p = p + 4;
315 itv->video_dec_func(itv, VIDIOC_INT_DECODE_VBI_LINE, &vbi); 316 itv->video_dec_func(itv, VIDIOC_INT_DECODE_VBI_LINE, &vbi);
316 if (vbi.type) { 317 if (vbi.type && !(lines & (1 << vbi.line))) {
318 lines |= 1 << vbi.line;
317 itv->vbi.sliced_data[line].id = vbi.type; 319 itv->vbi.sliced_data[line].id = vbi.type;
318 itv->vbi.sliced_data[line].field = vbi.is_second_field; 320 itv->vbi.sliced_data[line].field = vbi.is_second_field;
319 itv->vbi.sliced_data[line].line = vbi.line; 321 itv->vbi.sliced_data[line].line = vbi.line;