aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.h1
-rw-r--r--drivers/media/video/ivtv/ivtv-fileops.c7
-rw-r--r--drivers/media/video/ivtv/ivtv-ioctl.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.h b/drivers/media/video/ivtv/ivtv-driver.h
index 03d31860851b..3ed4703956d3 100644
--- a/drivers/media/video/ivtv/ivtv-driver.h
+++ b/drivers/media/video/ivtv/ivtv-driver.h
@@ -517,6 +517,7 @@ struct ivtv_stream {
517struct ivtv_open_id { 517struct ivtv_open_id {
518 u32 open_id; 518 u32 open_id;
519 int type; 519 int type;
520 int yuv_frames;
520 enum v4l2_priority prio; 521 enum v4l2_priority prio;
521 struct ivtv *itv; 522 struct ivtv *itv;
522}; 523};
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c
index 1f3c8d0310f5..62ee41c5220b 100644
--- a/drivers/media/video/ivtv/ivtv-fileops.c
+++ b/drivers/media/video/ivtv/ivtv-fileops.c
@@ -757,6 +757,7 @@ static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts)
757 IVTV_DEBUG_INFO("close stopping decode\n"); 757 IVTV_DEBUG_INFO("close stopping decode\n");
758 758
759 ivtv_stop_v4l2_decode_stream(s, flags, pts); 759 ivtv_stop_v4l2_decode_stream(s, flags, pts);
760 itv->output_mode = OUT_NONE;
760 } 761 }
761 clear_bit(IVTV_F_S_APPL_IO, &s->s_flags); 762 clear_bit(IVTV_F_S_APPL_IO, &s->s_flags);
762 clear_bit(IVTV_F_S_STREAMOFF, &s->s_flags); 763 clear_bit(IVTV_F_S_STREAMOFF, &s->s_flags);
@@ -764,11 +765,7 @@ static void ivtv_stop_decoding(struct ivtv_open_id *id, int flags, u64 pts)
764 /* Restore registers we've changed & clean up any mess we've made */ 765 /* Restore registers we've changed & clean up any mess we've made */
765 ivtv_yuv_close(itv); 766 ivtv_yuv_close(itv);
766 } 767 }
767 if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_YUV) 768 if (itv->output_mode == OUT_UDMA_YUV && id->yuv_frames)
768 itv->output_mode = OUT_NONE;
769 else if (s->type == IVTV_DEC_STREAM_TYPE_YUV && itv->output_mode == OUT_UDMA_YUV)
770 itv->output_mode = OUT_NONE;
771 else if (s->type == IVTV_DEC_STREAM_TYPE_MPG && itv->output_mode == OUT_MPG)
772 itv->output_mode = OUT_NONE; 769 itv->output_mode = OUT_NONE;
773 770
774 itv->speed = 0; 771 itv->speed = 0;
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c
index ed5707660e0e..2bb1e324785b 100644
--- a/drivers/media/video/ivtv/ivtv-ioctl.c
+++ b/drivers/media/video/ivtv/ivtv-ioctl.c
@@ -1346,6 +1346,8 @@ static int ivtv_decoder_ioctls(struct file *filp, unsigned int cmd, void *arg)
1346 ivtv_release_stream(s); 1346 ivtv_release_stream(s);
1347 return -EBUSY; 1347 return -EBUSY;
1348 } 1348 }
1349 /* Mark that this file handle started the UDMA_YUV mode */
1350 id->yuv_frames = 1;
1349 if (args->y_source == NULL) 1351 if (args->y_source == NULL)
1350 return 0; 1352 return 0;
1351 return ivtv_yuv_prep_frame(itv, args); 1353 return ivtv_yuv_prep_frame(itv, args);