diff -Naur MPlayer-0.90rc1.orig/libdha/pci.c MPlayer-0.90rc1/libdha/pci.c --- MPlayer-0.90rc1.orig/libdha/pci.c 2003-01-01 23:35:09.000000000 +0100 +++ MPlayer-0.90rc1/libdha/pci.c 2003-01-01 23:39:23.000000000 +0100 @@ -493,10 +493,9 @@ #endif -static int pcicards=0 ; static pciinfo_t *pci_lst; -static void identify_card(struct pci_config_reg *pcr) +static void identify_card(struct pci_config_reg *pcr, int pcicards) { if (pcicards>=MAX_PCI_DEVICES) return ; @@ -517,8 +516,6 @@ if (pcr->_base2) pci_lst[pcicards].base2 = pcr->_base2 & ((pcr->_base2&0x1) ? 0xFFFFFFFC : 0xFFFFFFF0) ; if (pcr->_baserom) pci_lst[pcicards].baserom = pcr->_baserom ; - - pcicards++; } /*main(int argc, char *argv[])*/ @@ -531,6 +528,7 @@ int ret = -1; pci_lst = pci_list; + *num_pci = 0; ret = enable_os_io(); if (ret != 0) @@ -623,7 +621,7 @@ if (idx++ >= MAX_PCI_DEVICES) continue; - identify_card(&pcr); + identify_card(&pcr, (*num_pci)++); } while( func < 8 ); } } while (++pcr._pcibusidx < pcr._pcinumbus); @@ -683,7 +681,7 @@ if (idx++ >= MAX_PCI_DEVICES) continue; - identify_card(&pcr); + identify_card(&pcr, (*num_pci)++); } } while (++pcr._pcibusidx < pcr._pcinumbus); @@ -693,7 +691,6 @@ #endif /* __alpha__ */ disable_os_io(); - *num_pci = pcicards; return 0 ;