sws: handle jpeg pixel formats in sws_init_context()
Fixes Ticket576 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									3495817468
								
							
						
					
					
						commit
						5bccb2d096
					
				@ -771,6 +771,15 @@ int sws_init_context(SwsContext *c, SwsFilter *srcFilter, SwsFilter *dstFilter)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    unscaled = (srcW == dstW && srcH == dstH);
 | 
					    unscaled = (srcW == dstW && srcH == dstH);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    handle_jpeg(&srcFormat);
 | 
				
			||||||
 | 
					    handle_jpeg(&dstFormat);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if(srcFormat!=c->srcFormat || dstFormat!=c->dstFormat){
 | 
				
			||||||
 | 
					        av_log(c, AV_LOG_WARNING, "deprecated pixel format used, make sure you did set range correctly\n");
 | 
				
			||||||
 | 
					        c->srcFormat= srcFormat;
 | 
				
			||||||
 | 
					        c->dstFormat= dstFormat;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (!sws_isSupportedInput(srcFormat)) {
 | 
					    if (!sws_isSupportedInput(srcFormat)) {
 | 
				
			||||||
        av_log(c, AV_LOG_ERROR, "%s is not supported as input pixel format\n", av_get_pix_fmt_name(srcFormat));
 | 
					        av_log(c, AV_LOG_ERROR, "%s is not supported as input pixel format\n", av_get_pix_fmt_name(srcFormat));
 | 
				
			||||||
        return AVERROR(EINVAL);
 | 
					        return AVERROR(EINVAL);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user