[mythtv] Updated patch for directshow filters with MythTV (for CoreAVC)

Alan Nisota alannisota at gmail.com
Tue Feb 13 15:53:47 UTC 2007


Andrew Lyon wrote:
> Confirmed, 1.2 fixes the compile issue. I will test it later today as
> I am at work now.
>   
Here is a patch on top of 1.2 that will allow you to watch more than 2 
shows before it crashes.  Mplayer is not designed to initialize a DLL 
more than once, which is causing this issue.

Index: libs/libdshowloader/win32.c
===================================================================
--- libs/libdshowloader/win32.c.orig    2007-02-13 07:49:15.000000000 -0800
+++ libs/libdshowloader/win32.c 2007-02-13 07:47:29.000000000 -0800
@@ -5577,6 +5577,16 @@
     }
 
 no_dll:
+    {
+       /* Search to see if this function has alreayd been defined */
+       char expname[80];
+       sprintf(expname, "%s:%d", library, ordinal);
+       j = strlen(expname);
+       for(i=0; i < pos; i++) {
+           if(strncmp(expname,export_names[i], j) == 0)
+               return (void*)extcode+i*0x30;
+       }
+    }
     if(pos>150)return 0;
     sprintf(export_names[pos], "%s:%d", library, ordinal);
     return add_stub();
@@ -5645,6 +5655,14 @@
     }
 
 no_dll_byname:
+    {
+       /* Search to see if this function has alreayd been defined */
+       j = strlen(name);
+       for(i=0; i < pos; i++) {
+           if(strncmp(name,export_names[i], j) == 0)
+               return (void*)extcode+i*0x30;
+       }
+    }
     if(pos>150)return 0;// to many symbols
     strcpy(export_names[pos], name);
     return add_stub();



More information about the mythtv-dev mailing list