diff options
author | Johannes Stezenbach <devnull@localhost> | 2003-05-07 17:34:26 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2003-05-07 17:34:26 +0000 |
commit | f0994cad92142782ac5a8078d53b9fe5def990b4 (patch) | |
tree | 68388e79b7169b93481c04b71332352dc360fb71 | |
parent | f1bee9370a57e4297c6f90a10e8ba53e9cbf51c5 (diff) | |
download | mediapointer-dvb-s2-f0994cad92142782ac5a8078d53b9fe5def990b4.tar.gz mediapointer-dvb-s2-f0994cad92142782ac5a8078d53b9fe5def990b4.tar.bz2 |
fix blocking in VIDEO_STILLPICTURE when a video PES filter was set
with DMX_OUT_TS_TAP (recording); return EBUSY instead
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 9 |
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; } |