Merge commit '88626e5af8d006e67189bf10b96b982502a7e8ad'
* commit '88626e5af8d006e67189bf10b96b982502a7e8ad': jvdec: check frame dimensions See: 105654e376a736d243aef4a1d121abebce912e6b Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		
						commit
						f346e37aa2
					
				@ -43,6 +43,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
    JvContext *s = avctx->priv_data;
 | 
					    JvContext *s = avctx->priv_data;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if (!avctx->width || !avctx->height ||
 | 
				
			||||||
 | 
					        (avctx->width & 7) || (avctx->height & 7)) {
 | 
				
			||||||
 | 
					        av_log(avctx, AV_LOG_ERROR, "Invalid video dimensions: %dx%d\n",
 | 
				
			||||||
 | 
					               avctx->width, avctx->height);
 | 
				
			||||||
 | 
					        return AVERROR(EINVAL);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    s->frame = av_frame_alloc();
 | 
					    s->frame = av_frame_alloc();
 | 
				
			||||||
    if (!s->frame)
 | 
					    if (!s->frame)
 | 
				
			||||||
        return AVERROR(ENOMEM);
 | 
					        return AVERROR(ENOMEM);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user