From 088bbfc7d9b89cabab8993c5ddc9f24508a97cac Mon Sep 17 00:00:00 2001 From: Holger Waechtler Date: Mon, 21 Oct 2002 16:55:36 +0000 Subject: reset ringbuffer on error in read() callback too --- linux/drivers/media/dvb/dvb-core/dmxdev.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c index 4fd88123b..85681063a 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.c +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c @@ -109,7 +109,8 @@ dvb_dmxdev_buffer_read(dmxdev_buffer_t *src, int non_blocking, return 0; if ((error=src->error)) { - src->error=0; + src->pwrite=src->pread; + src->error=0; return error; } @@ -126,6 +127,7 @@ dvb_dmxdev_buffer_read(dmxdev_buffer_t *src, int non_blocking, return count-todo; if ((error=src->error)) { + src->pwrite=src->pread; src->error=0; return error; } -- cgit v1.2.3