summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 11185d662..85d71def9 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -3496,7 +3496,7 @@ u8 iframe_header[] = { 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x80, 0x00, 0x00 };
#define MIN_IFRAME 400000
-static void
+static int
play_iframe(av7110_t *av7110, u8 *buf, unsigned int len, int nonblock)
{
int i, n=1;
@@ -3504,16 +3504,19 @@ play_iframe(av7110_t *av7110, u8 *buf, unsigned int len, int nonblock)
DEB_EE(("av7110: %p\n",av7110));
if (!(av7110->playing&RP_VIDEO)) {
- AV_StartPlay(av7110, RP_VIDEO);
+ if (AV_StartPlay(av7110, RP_VIDEO) < 0)
+ return -EBUSY;
n=MIN_IFRAME/len+1;
}
+ /* FIXME: nonblock? */
dvb_play(av7110, iframe_header, sizeof(iframe_header), 0, 1, 0);
for (i=0; i<n; i++)
dvb_play(av7110, buf, len, 0, 1, 1);
av7110_ipack_flush(&av7110->ipack[1]);
+ return 0;
}
@@ -3647,7 +3650,7 @@ dvb_video_ioctl(struct inode *inode, struct file *file,
(struct video_still_picture *) parg;
av7110->videostate.stream_source = VIDEO_SOURCE_MEMORY;
dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);
- play_iframe(av7110, pic->iFrame, pic->size,
+ ret = play_iframe(av7110, pic->iFrame, pic->size,
file->f_flags&O_NONBLOCK);
break;
}