wxMediaCtrl causes crash on second call to Load()

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Locked
jazz
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Jun 09, 2005 12:37 am
Contact:

wxMediaCtrl causes crash on second call to Load()

Post by jazz » Sun Mar 25, 2007 9:09 am

Ok, first off, I don't even know this is suppose to work but I'm thinking "why shouldn't it?"

Basically i have extended wxMediaCtrl to create my own class. When I want to play a file i first call wxMediaCtrl::Load( filename ) then once the EVT_MEDIA_LOADED event fires I call wxMediaCtrl::Play().

That works fine and I can hear the MP3 i'm trying to play.

Now, the second time i go through that process my whole program crashes and burns at the wxMediaCtrl::Load( filename ) call. I am using the same instance of the wxMediaCtrl object that played the first file.

Is it not possible to call Load() on an instantiated object that has already played a file? Am i suppose to be deleting the wxMediaCtrl object and creating a new instance to load the new media file (seems silly)?

I am using wxWidgets-2.8.2
[INSERT LAME SIG HERE]

jazz
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Jun 09, 2005 12:37 am
Contact:

Post by jazz » Sun Mar 25, 2007 9:28 am

!!UPDATE!!

I just built the Mediaplayer sample in wxWidgets-2.8.2\samples\mediaplayer, executed it and clicked File\Open File. It played my MP3 the first time, but then when i clicked File\Open File again it crashed just like my app.

Umm.. help!?
[INSERT LAME SIG HERE]

jazz
Experienced Solver
Experienced Solver
Posts: 73
Joined: Thu Jun 09, 2005 12:37 am
Contact:

Post by jazz » Wed Mar 28, 2007 12:23 pm

In the interest of sharing information, I finally figured this out.

On a whim I decided to remove my Cole2k media pack that I use for all my codecs. Then I started up Windows Media Player to play an MP3 and let it download the Fraunhofer codec. After that my app works fine and wxMediaCtrl doesn't bomb out.

You can get a detailed explanation of my experience here: http://boost.funkynerd.com/ticket/10
[INSERT LAME SIG HERE]

Locked