@@ -60,6 +60,10 @@ static int filter_get_image(mlt_frame frame,
6060 int error = mlt_frame_get_image (frame , image , format , width , height , 1 );
6161
6262 if (error == 0 ) {
63+ double pixel_aspect_ratio = mlt_frame_get_aspect_ratio (frame );
64+ if (pixel_aspect_ratio <= 0.0 )
65+ pixel_aspect_ratio = 1.0 ;
66+
6367 mlt_position position = mlt_filter_get_position (filter , frame );
6468 mlt_position length = mlt_filter_get_length2 (filter , frame );
6569 int params_count = mlt_properties_count (params );
@@ -147,8 +151,20 @@ static int filter_get_image(mlt_frame frame,
147151 uint8_t * src_copy = src_img_copy .data ;
148152
149153 memcpy (src_copy , * image , mlt_image_calculate_size (& src_img ));
150- mltofx_set_source_clip_data (plugin , image_effect , src_copy , * width , * height , * format );
151- mltofx_set_output_clip_data (plugin , image_effect , * image , * width , * height , * format );
154+ mltofx_set_source_clip_data (plugin ,
155+ image_effect ,
156+ src_copy ,
157+ * width ,
158+ * height ,
159+ * format ,
160+ pixel_aspect_ratio );
161+ mltofx_set_output_clip_data (plugin ,
162+ image_effect ,
163+ * image ,
164+ * width ,
165+ * height ,
166+ * format ,
167+ pixel_aspect_ratio );
152168
153169 mlt_service_lock (MLT_FILTER_SERVICE (filter ));
154170 mltofx_action_render (plugin , image_effect , * width , * height );
0 commit comments