mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 12:44:46 +01:00
Improve support for load of online audio-only media
This commit is contained in:
parent
f05c81fc41
commit
601fa422e1
@ -20898,7 +20898,7 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
|
||||
private void LoadVideoInfoAfterVideoFromUrlLoad()
|
||||
{
|
||||
if (VideoFileNameIsUrl && _videoInfo == null && mediaPlayer.VideoPlayer is LibMpvDynamic libMpv && libMpv.VideoWidth > 0)
|
||||
if (VideoFileNameIsUrl && _videoInfo == null && mediaPlayer.VideoPlayer is LibMpvDynamic libMpv && libMpv.Duration > 0)
|
||||
{
|
||||
_videoInfo = new VideoInfo()
|
||||
{
|
||||
@ -20914,9 +20914,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
mediaPlayer.VideoHeight = _videoInfo.Height;
|
||||
mediaPlayer.SetSubtitleText(string.Empty, new Paragraph(), new Subtitle(), GetCurrentSubtitleFormat());
|
||||
UiUtil.ShowSubtitle(_subtitle, mediaPlayer, GetCurrentSubtitleFormat());
|
||||
|
||||
if (Configuration.Settings.General.WaveformAutoGenWhenOpeningVideo)
|
||||
{
|
||||
AddEmptyWaveform();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void VideoEnded(object sender, EventArgs e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user