gifenc: support resolutions up to 65535x65535
Maybe someone can add a check in the second gif encoder (rgb24), because I'm not sure where it should be added. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
							parent
							
								
									d2581dcca6
								
							
						
					
					
						commit
						e03ddbcd91
					
				| @ -145,6 +145,11 @@ static av_cold int gif_encode_init(AVCodecContext *avctx) | |||||||
| { | { | ||||||
|     GIFContext *s = avctx->priv_data; |     GIFContext *s = avctx->priv_data; | ||||||
| 
 | 
 | ||||||
|  |     if (avctx->width > 65535 || avctx->height > 65535) { | ||||||
|  |         av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n"); | ||||||
|  |         return -1; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     avctx->coded_frame = &s->picture; |     avctx->coded_frame = &s->picture; | ||||||
|     s->lzw = av_mallocz(ff_lzw_encode_state_size); |     s->lzw = av_mallocz(ff_lzw_encode_state_size); | ||||||
|     if (!s->lzw) |     if (!s->lzw) | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user