[mythtv] [PATCH] MacOS X crash fixed (Was: Compile error in videoout_quartz.cpp on MacOS X)

Eggert Thorlacius eggi-spam at menandmice.com
Wed Apr 27 22:27:25 UTC 2005


On 27.4.2005, at 14:45, Eggert Thorlacius wrote:

>
> On 27.4.2005, at 13:37, Daniel Kristjansson wrote:
>
>> On Wed, 2005-04-27 at 09:23 +0000, Eggert Thorlacius wrote:
>>> Hello
>>>
>>> I am trying to compile MythTV on MacOS X for the first time after
>>> Daniel committed the Xv-XvMC patch and I am having problems with
>>> videoout_quartz.cpp.  It seemes that the data type CodecType is 
>>> defined
>>> both in libavcodec/avcodec.h and in QuickTime.h
>> This is my fault, I added avcodec.h to videooutbase.h for the CodecID
>> type. Is it difficult to put QuickTime.h into a namespace? Putting
>> avcodec.h in a namespace requires changing many files.
>
> Tried that and got mythtv to link, but as soon as I selected "Watch 
> TV" it crashed with the following backtrace:
>
> #0  0x908311ec in objc_msgSend ()
> #1  0x96547a0c in numberForKey ()
> #2  0x96546bcc in CGDisplayCurrentMode ()
> #3  0xc91c2008 in VideoOutputQuartz::Init(int, int, float, int, int, 
> int, int, int, int) ()
> #4  0xc903f070 in NuppelVideoPlayer::InitVideo() ()
> #5  0xc904b884 in NuppelVideoPlayer::StartPlaying() ()
> #6  0xc90ca830 in SpawnDecode(void*) ()
> #7  0x90024910 in _pthread_body ()
>
> Maybe I'm on the wrong track but my guess is that 
> CGDisplayCurrentMode() was calling a QuickTime function whose name got 
> mangled because of the namespace.
>
> I can look into this if you like (now that I know that this isn't just 
> a setup problem on my end). I'll see if I can split videoout_quartz 
> into two files, and have different #includes in each.  If I can get it 
> to link that way and still get a crash, then we can add a namespace 
> and start looking elsewhere for the cause of the crash :-)
>
> Eggert

Thanks Daniel, for fixing the #include problem.  Unfortunately it did 
not fix the crash in VideoOutputQuartz::Init().  I did a bit of 
debugging and discovered that CGDisplayCurrentMode() was referring to 
data that DisplayResOSX::GetDisplaySize() had incorrectly deleted.  I 
have attached a fix for this, as well as a small #ifdef to prevent the 
Mac build from #including videoout_xv.h

Eggert

-------------- next part --------------
A non-text attachment was scrubbed...
Name: macosx_segfault_fix.diff
Type: application/text
Size: 1253 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20050427/b19c3619/macosx_segfault_fix.bin


More information about the mythtv-dev mailing list