[MPlayer-dvb] [PATCH] Allow simultaneous playing of multiple DVB cards

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Nov 24 02:43:29 CET 2006


Hi Nico!

I have 2 DVB cards in my computer:
While I use card #2 (mplayer dvb://2@ORF1), I can still use card #1: mplayer
dvb://1@ATV works with current svn as expected.

While using the first card (mplayer dvb://1@ORF1), it's not possible to start
receiving from the second one: NO CONFIGURATION FOUND FOR CARD N. 2, exit

Following patch fixes this issue for me.

Greetings, Carl Eugen

Index: stream/stream_dvb.c
===================================================================
--- stream/stream_dvb.c (Revision 21185)
+++ stream/stream_dvb.c (Arbeitskopie)
@@ -666,7 +666,7 @@
        struct stream_priv_s* p = (struct stream_priv_s*)opts;
        dvb_priv_t *priv;
        char *progname;
-       int tuner_type = 0;
+       int tuner_type = 0, i;


        if(mode != STREAM_READ)
@@ -688,6 +688,14 @@
        dvb_config->priv = priv;
        priv->config = dvb_config;

+       if(p->card > priv->config->count)
+               for(i=0; i<priv->config->count; i++)
+                       if(priv->config->cards[i].devno+1 == p->card)
+                       {
+                               p->card = i+1;
+                               break;
+                       }
+
        if(p->card < 1 || p->card > priv->config->count)
        {
                free(priv);





More information about the MPlayer-dvb mailing list