diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-fileops.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-fileops.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index 908e640c274d..076b0089a2b0 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -247,8 +247,9 @@ static struct ivtv_buffer *ivtv_get_buffer(struct ivtv_stream *s, int non_block, | |||
247 | /* do we have new data? */ | 247 | /* do we have new data? */ |
248 | buf = ivtv_dequeue(s, &s->q_full); | 248 | buf = ivtv_dequeue(s, &s->q_full); |
249 | if (buf) { | 249 | if (buf) { |
250 | if (!test_and_clear_bit(IVTV_F_B_NEED_BUF_SWAP, &buf->b_flags)) | 250 | if ((buf->b_flags & IVTV_F_B_NEED_BUF_SWAP) == 0) |
251 | return buf; | 251 | return buf; |
252 | buf->b_flags &= ~IVTV_F_B_NEED_BUF_SWAP; | ||
252 | if (s->type == IVTV_ENC_STREAM_TYPE_MPG) | 253 | if (s->type == IVTV_ENC_STREAM_TYPE_MPG) |
253 | /* byteswap MPG data */ | 254 | /* byteswap MPG data */ |
254 | ivtv_buf_swap(buf); | 255 | ivtv_buf_swap(buf); |