mirror of
https://github.com/rosenbjerg/FFMpegCore.git
synced 2025-02-18 11:02:31 +00:00
PrepareSnapshotSize error : ratio=source.PrimaryVideoStream.Width / 0
ratio=source.PrimaryVideoStream.Height / 0
This commit is contained in:
parent
59ca76cdfa
commit
74593461d4
1 changed files with 2 additions and 2 deletions
|
@ -76,7 +76,7 @@ namespace FFMpegCore
|
|||
{
|
||||
if (size.Value.Width == 0)
|
||||
{
|
||||
var ratio = source.PrimaryVideoStream.Width / (double) size.Value.Width;
|
||||
var ratio = source.PrimaryVideoStream.Height / (double) size.Value.Height;
|
||||
|
||||
size = new Size((int) (source.PrimaryVideoStream.Width * ratio),
|
||||
(int) (source.PrimaryVideoStream.Height * ratio));
|
||||
|
@ -84,7 +84,7 @@ namespace FFMpegCore
|
|||
|
||||
if (size.Value.Height == 0)
|
||||
{
|
||||
var ratio = source.PrimaryVideoStream.Height / (double) size.Value.Height;
|
||||
var ratio = source.PrimaryVideoStream.Width / (double) size.Value.Width;
|
||||
|
||||
size = new Size((int) (source.PrimaryVideoStream.Width * ratio),
|
||||
(int) (source.PrimaryVideoStream.Height * ratio));
|
||||
|
|
Loading…
Add table
Reference in a new issue