vf_scale: apply the same transform to the aspect during init that is applied per frame
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit d33e0c6bc8)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
			
			
This commit is contained in:
		
				
					committed by
					
						
						Reinhard Tartler
					
				
			
			
				
	
			
			
			
						parent
						
							af58dd4798
						
					
				
				
					commit
					7f62cf120b
				
			@@ -213,6 +213,14 @@ static int config_props(AVFilterLink *outlink)
 | 
				
			|||||||
    if (!scale->sws)
 | 
					    if (!scale->sws)
 | 
				
			||||||
        return AVERROR(EINVAL);
 | 
					        return AVERROR(EINVAL);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (inlink->sample_aspect_ratio.num)
 | 
				
			||||||
 | 
					        outlink->sample_aspect_ratio = av_mul_q((AVRational){outlink->h*inlink->w,
 | 
				
			||||||
 | 
					                                                             outlink->w*inlink->h},
 | 
				
			||||||
 | 
					                                                inlink->sample_aspect_ratio);
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        outlink->sample_aspect_ratio = inlink->sample_aspect_ratio;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return 0;
 | 
					    return 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fail:
 | 
					fail:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user