ExampleVolume not working (in 32bit)
Submitted by Carl Duckels
Link to original bug (#797271)
Description
Created attachment 373887
gStreamer Debug Outputs
Hello,
I have been unable to run the ExampleVolume.cs with Platform set as "Any CPU", which is defaulting to 32bit.
https://github.com/GStreamer/gstreamer-sharp/blob/master/samples/ExampleVolume.cs
It appears that the new Pads are being corrupted by the 'xxxx.Flags |= PadFlags.ProxyCaps;' calls.
Original Code with a couple of lines added for illustration of the issue:
class ExampleVolume : Element
{
public ExampleVolume()
{
Volume = 0.5;
_sink = new Pad(__sinkTemplate, "sink");
_sink.ChainFunctionFull = Chain;
_sink.Flags |= PadFlags.ProxyCaps;
AddPad(_sink);
Console.WriteLine("_sink.Parent.Name: ", _sink.Parent.Name); // For demo
_src = new Pad(__srcTemplate, "src");
_src.Flags |= PadFlags.ProxyCaps;
AddPad(_src);
Console.WriteLine("_sink.Parent.Name: ", _src.Parent.Name); // For demo
}
The lines marked "// For demo" cause an Access Violation if "xxxx.Flags |= PadFlags.ProxyCaps" has been called
previously.
If the "xxxx.Flags |= PadFlags.ProxyCaps" is commented out the "For demo" lines no not cause an Access Violation
This issues goes away when force the system to 64bit, however the example still does work with other issues.
I have attached the Debug for 32bit and 64bit in a ZIP file for reference. These were run without the "// For demo" lines in place
Thanks, Carl
Attachment 373887, "gStreamer Debug Outputs":
GSDump.zip
Version: 1.14.x