VLC 1.1x Mutex Lock problem

This forum is about all development around libVLC.
MidnightCoder
Blank Cone
Blank Cone
Posts: 82
Joined: 08 Aug 2008 06:04

VLC 1.1x Mutex Lock problem

Postby MidnightCoder » 03 Feb 2011 12:26

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

JoungEunKim
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 10 Dec 2009 00:21

Re: VLC 1.1x Mutex Lock problem

Postby JoungEunKim » 04 Feb 2011 03:17

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!!!

MidnightCoder
Blank Cone
Blank Cone
Posts: 82
Joined: 08 Aug 2008 06:04

Re: VLC 1.1x Mutex Lock problem

Postby MidnightCoder » 04 Feb 2011 04:03

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 :).

Rumpel
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Feb 2011 08:18

Re: VLC 1.1x Mutex Lock problem

Postby Rumpel » 11 Feb 2011 08:24

Hi tommy382

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

MidnightCoder
Blank Cone
Blank Cone
Posts: 82
Joined: 08 Aug 2008 06:04

Re: VLC 1.1x Mutex Lock problem

Postby MidnightCoder » 12 Feb 2011 21:52

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.

Rumpel
Blank Cone
Blank Cone
Posts: 16
Joined: 11 Feb 2011 08:18

Re: VLC 1.1x Mutex Lock problem

Postby Rumpel » 17 Feb 2011 16:07

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()


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests