]> git.sesse.net Git - vlc/blobdiff - bin/winvlc.c
demux: ts: only interpolate PCR on missing PCR
[vlc] / bin / winvlc.c
index 3209b464d70bd92a387fb09e0d251a1dbd436ce1..33784e294d41c12914bc7ede89871ecfbd6bc62b 100644 (file)
@@ -90,13 +90,13 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
         BOOL (WINAPI * mySetDllDirectoryA)(const char* lpPathName);
 # define PROCESS_DEP_ENABLE 1
 
-        mySetProcessDEPPolicy = (BOOL WINAPI (*)(DWORD))
+        mySetProcessDEPPolicy = (BOOL (WINAPI *)(DWORD))
                             GetProcAddress(h_Kernel32, "SetProcessDEPPolicy");
         if(mySetProcessDEPPolicy)
             mySetProcessDEPPolicy(PROCESS_DEP_ENABLE);
 
         /* Do NOT load any library from cwd. */
-        mySetDllDirectoryA = (BOOL WINAPI (*)(const char*))
+        mySetDllDirectoryA = (BOOL (WINAPI *)(const char*))
                             GetProcAddress(h_Kernel32, "SetDllDirectoryA");
         if(mySetDllDirectoryA)
             mySetDllDirectoryA("");
@@ -109,13 +109,12 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
     if (wargv == NULL)
         return 1;
 
-    char *argv[argc + 4];
+    char *argv[argc + 3];
     BOOL crash_handling = TRUE;
     int j = 0;
     char *lang = NULL;
 
     argv[j++] = FromWide( L"--media-library" );
-    argv[j++] = FromWide( L"--stats" );
     argv[j++] = FromWide( L"--no-ignore-config" );
     for (int i = 1; i < argc; i++)
     {
@@ -151,7 +150,7 @@ int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
         SetUnhandledExceptionFilter(vlc_exception_filter);
     }
 
-    _setmode( STDIN_FILENO, _O_BINARY ); /* Needed for pipes */
+    _setmode( _fileno( stdin ), _O_BINARY ); /* Needed for pipes */
 
     /* */
     if (!lang)
@@ -356,6 +355,9 @@ LONG WINAPI vlc_exception_filter(struct _EXCEPTION_POINTERS *lpExceptionInfo)
             GetModuleFileName( mbi.AllocationBase, module, 256 );
             fwprintf( fd, L"%p|%ls\n", caller, module );
 
+            if( IsBadReadPtr( pBase, 2 * sizeof( void* ) ) )
+                break;
+
             /*The last BP points to NULL!*/
             caller = *(pBase + 1);
             if( !caller )