From 165a7d69600daae3a5501569a8805e84d3122daf Mon Sep 17 00:00:00 2001 From: Petri Hintukainen Date: Tue, 18 Oct 2011 09:44:08 +0300 Subject: input_dvb: if write() fails, stop recording and log a message --- src/input/input_dvb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c index fc3c88862..f7fa51e16 100644 --- a/src/input/input_dvb.c +++ b/src/input/input_dvb.c @@ -2579,7 +2579,11 @@ static off_t dvb_plugin_read (input_plugin_t *this_gen, ts_rewrite_packets (this, buf,total); if ((this->record_fd > -1) && (!this->record_paused)) - write (this->record_fd, buf, total); + if (write (this->record_fd, buf, total) != total) { + do_record(this); + xprintf(this->class->xine, XINE_VERBOSITY_LOG, + "input_dvb: Recording failed\n"); + } pthread_mutex_unlock( &this->channel_change_mutex ); -- cgit v1.2.3