Page 1 of 1

VLC 1.1x Mutex Lock problem

Posted: 03 Feb 2011 12:26
by MidnightCoder
Since v1.1.0, a few libvlc extern audio-related functions don't work anymore. As of v1.1.17, the issue still exist. To help with debugging, I picked one function that doesn't work (libvlc_audio_get_channel) and one function that does work (libvlc_audio_get_track) and play the same media file and show the callstack and the values of the related variables. I will use this topic as a reference when I send an email to the dev mailing list. Please reply to this topic if you have an idea on how to solve this issue. Thanks.

The code base I'm using is v1.16. In the "GetChannel" case, the call to EnterCriticalSelection() failed. In the "GetTrack" case, the call to EnterCriticalSelection() works fine. It looks like there is already an owning thread in the "GetChannel" case? Is that the problem? How to fix that?

Call-stack of "GetChannel" case:
Image

Call-stack of "GetTrack" case:
Image

Re: VLC 1.1x Mutex Lock problem

Posted: 04 Feb 2011 03:17
by JoungEunKim
Hi. tommy382.

I'm not sure.

I don't debug that part, because libvlc_audio_get_channel() is SDK. :)

But I read your debug message, I have an opinion.

First part p_mi is not valid.

Because psz_object_type("8..") is not valid and mutex address is 0xfeeefeee, it means sometimes in VisualStudio, address is not valid.

Please check about before to call libvlc_audio_get_channel().

Bye!!!

Re: VLC 1.1x Mutex Lock problem

Posted: 04 Feb 2011 04:03
by MidnightCoder
I acted on your tip and was able to fix the problem. All audio-related extern functions now work!!! Version v1.1x updated the function signature but I was not aware of that and passed in the wrong pointer on the wrapper code. The compiler couldn't detect the problem since they are both valid pointers.

Thank you so much Sunqueen, your tip made my day on Lunar New Year :).

Re: VLC 1.1x Mutex Lock problem

Posted: 11 Feb 2011 08:24
by Rumpel
Hi tommy382

how did you fix the problem? Cause i have the same problem by call libvlc_media_player_stop()

Re: VLC 1.1x Mutex Lock problem

Posted: 12 Feb 2011 21:52
by MidnightCoder
That is a different problem, I think. I don't have any problem w/ the stop function. Check the function signature and make sure you pass in the object it required and not something else.

Re: VLC 1.1x Mutex Lock problem

Posted: 17 Feb 2011 16:07
by Rumpel
So i checked the function signature and everything is good. I think it is better i give some more information about my application.
I have an application which create more then one vlc instance so that i can play morge videos at the same time.
On Windows XP i can call the stop function a few times but after a while it crash and on Windows 7 32bit it is the same situation. But on Windows 7 64bit it crash at the first call of libvlc_media_player_stop()