[MPlayer-dev-eng] [PATCH] dvb input fails after a couple of seconds

Mark Bryars mark at darkskiez.co.uk
Wed Oct 1 17:23:22 CEST 2003


The dvb tuner closes the frontend after tuning, this causes the driver
(at least on my budget card) to stop sending data to the dvr device.
This results in the error,

dvb_streaming_read, attempt N. 5 failed with errno 11 when reading ...

This small patch keeps the frontend open after tuning allowing dvb to
work on these cards and driver combinations.

Hope this helps.

Regards
 Mark Bryars


--- main-old/libmpdemux/dvb_tune.c      2003-10-01 16:02:26.000000000 +0100
+++ main/libmpdemux/dvb_tune.c  2003-10-01 16:04:22.000000000 +0100
@@ -101,7 +101,9 @@
  
 static int open_fe(dvb_priv_t *priv)
 {
-       priv->fe_fd = open(dvb_frontenddev[priv->card], O_RDWR);
+        if (priv->fe_fd == 0)
+               priv->fe_fd = open(dvb_frontenddev[priv->card], O_RDWR);
+
        if(priv->fe_fd < 0)
        {
                mp_msg(MSGT_DEMUX, MSGL_ERR, "ERROR IN OPENING FRONTEND DEVICE
%s: %d\n", dvb_frontenddev[priv->card], errno);
@@ -216,7 +218,7 @@
                tune_it(priv->fe_fd, priv->sec_fd, freq, srate, pol, tone,
specInv, diseqc, modulation, HP_CodeRate, TransmissionMode, guardInterval,
bandWidth);
        }
         
-       close(priv->fe_fd);
+       //close(priv->fe_fd);
         
 #ifdef HAVE_DVB_HEAD
 #else



-------------------------------------------------




More information about the MPlayer-dev-eng mailing list