From 887f42bd52edcf7ace6de74cbda0f45423157a7f Mon Sep 17 00:00:00 2001 From: RohanPunjani Date: Fri, 7 Jun 2024 09:22:10 +0530 Subject: [PATCH] fix: added code to set height and width of the output frame --- src/encoder.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/encoder.rs b/src/encoder.rs index 6a669c3..aa968ee 100644 --- a/src/encoder.rs +++ b/src/encoder.rs @@ -231,6 +231,12 @@ impl VideoEncoder { MediaEncodingProfile::CreateWmv(VideoEncodingQuality(encoder_quality as i32))? } }; + media_encoding_profile + .Video()? + .SetWidth(width)?; + media_encoding_profile + .Video()? + .SetHeight(height)?; let video_encoding_properties = VideoEncodingProperties::CreateUncompressed( &MediaEncodingSubtypes::Bgra8()?,