[vlc-devel] VLC Bindings with CLI

Rémi Denis-Courmont rdenis at simphalempin.com
Thu Jul 3 17:11:10 CEST 2008


Le jeudi 3 juillet 2008 14:24:34 Damien DALY, vous avez écrit :
> I have some strange issues when strings are passed between native and
> managed code. Sometimes I have readable text, and sometimes I have only
> squares.
> For example, I am able to handle libvlc log : I see readable messages, but
> some contains "squares" in the text, like this debug message : "adding item
> 'square' ( square )" (replace word "square" with ansi char 0x01).

> In Rémi's work, he has coded a transcoding class to create native libvlc
> strings (UTF8 + null terminal char) from managed strings. I am using it to
> read log data, but I don't know if i use it correctly, and if it works
> correctly.

My best guess is that the garbage collection is not done properly. Either VLC 
fails to strdup() a string passed by C#, or C# destroys a string too early. 
Probably the former. I cannot really comment out of the blue.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list