Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Martin Finkel
LibVLCSharp
Commits
c4573e35
Commit
c4573e35
authored
Nov 05, 2018
by
Martin Finkel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle setting Media to null on the MediaPlayer
parent
f928d037
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
LibVLCSharp/Shared/MediaPlayer.cs
LibVLCSharp/Shared/MediaPlayer.cs
+2
-1
No files found.
LibVLCSharp/Shared/MediaPlayer.cs
View file @
c4573e35
...
@@ -673,6 +673,7 @@ namespace LibVLCSharp.Shared
...
@@ -673,6 +673,7 @@ namespace LibVLCSharp.Shared
/// Get the media used by the media_player.
/// Get the media used by the media_player.
/// Set the media that will be used by the media_player.
/// Set the media that will be used by the media_player.
/// If any, previous md will be released.
/// If any, previous md will be released.
/// Note: It is safe to release the Media on the C# side after it's been set on the MediaPlayer successfully
/// </summary>
/// </summary>
public
Media
Media
public
Media
Media
{
{
...
@@ -681,7 +682,7 @@ namespace LibVLCSharp.Shared
...
@@ -681,7 +682,7 @@ namespace LibVLCSharp.Shared
var
mediaPtr
=
Native
.
LibVLCMediaPlayerGetMedia
(
NativeReference
);
var
mediaPtr
=
Native
.
LibVLCMediaPlayerGetMedia
(
NativeReference
);
return
mediaPtr
==
IntPtr
.
Zero
?
null
:
new
Media
(
mediaPtr
);
return
mediaPtr
==
IntPtr
.
Zero
?
null
:
new
Media
(
mediaPtr
);
}
}
set
=>
Native
.
LibVLCMediaPlayerSetMedia
(
NativeReference
,
value
.
NativeReference
);
set
=>
Native
.
LibVLCMediaPlayerSetMedia
(
NativeReference
,
value
?
.
NativeReference
??
IntPtr
.
Zero
);
}
}
/// <summary>
/// <summary>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment