mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2024-11-10 08:34:12 +01:00
Fixed VideoInfo ToString when no File is specified
Former-commit-id: b007e9105a
This commit is contained in:
parent
50eb92efcb
commit
ed1284fc31
1 changed files with 5 additions and 4 deletions
|
@ -8,6 +8,7 @@ namespace FFMpegCore
|
||||||
{
|
{
|
||||||
public class VideoInfo
|
public class VideoInfo
|
||||||
{
|
{
|
||||||
|
private const string NoVideoPlaceholder = "NULL";
|
||||||
private FileInfo _file;
|
private FileInfo _file;
|
||||||
|
|
||||||
internal VideoInfo()
|
internal VideoInfo()
|
||||||
|
@ -148,10 +149,10 @@ public static VideoInfo FromStream(System.IO.Stream stream)
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public override string ToString()
|
public override string ToString()
|
||||||
{
|
{
|
||||||
return "Video Path : " + FullName + Environment.NewLine +
|
return "Video Path : " + (_file != null ? FullName : NoVideoPlaceholder) + Environment.NewLine +
|
||||||
"Video Root : " + Directory.FullName + Environment.NewLine +
|
"Video Root : " + (_file != null ? Directory.FullName : NoVideoPlaceholder) + Environment.NewLine +
|
||||||
"Video Name: " + Name + Environment.NewLine +
|
"Video Name: " + (_file != null ? Name : NoVideoPlaceholder) + Environment.NewLine +
|
||||||
"Video Extension : " + Extension + Environment.NewLine +
|
"Video Extension : " + (_file != null ? Extension : NoVideoPlaceholder) + Environment.NewLine +
|
||||||
"Video Duration : " + Duration + Environment.NewLine +
|
"Video Duration : " + Duration + Environment.NewLine +
|
||||||
"Audio Format : " + AudioFormat + Environment.NewLine +
|
"Audio Format : " + AudioFormat + Environment.NewLine +
|
||||||
"Video Format : " + VideoFormat + Environment.NewLine +
|
"Video Format : " + VideoFormat + Environment.NewLine +
|
||||||
|
|
Loading…
Reference in a new issue