[mythtv] [PATCH] mythfrontend segfault fix

Shane Shrybman shrybman at aei.ca
Sun Dec 26 23:41:03 UTC 2004


On Sun, 2004-12-26 at 15:39, Mike Isely wrote:
...
> 
> I also noticed that the patch regarding this discussion thread included
> this little nugget:
> 
>  #ifdef USING_DIRECTX
> -        if (audioOutput)
> -            audioOutput->Reset();
> +        audioOutput->Reset();
>  #endif
> 
> Unless the patch is backwards that doesn't look like it will fix anything
> and will in fact lead to another possible SEGV at least for Win32 (I
> presume).
> 

It does look broken when you quote it like that. :) Here is the whole
Nugget. We only need to check if audioOutput exists once don't we?

-    if (normal_speed)
+    if (normal_speed && audioOutput)
     {
         audioOutput->SetStretchFactor(play_speed);
 #ifdef USING_DIRECTX
-        if (audioOutput)
-            audioOutput->Reset();
+        audioOutput->Reset();
 #endif
     }

Shane



More information about the mythtv-dev mailing list