wmaprodec: require block_align to be set.
Avoids an infinite loop in the calling programs with decoder not consuming any input and not returning output. CC:libav-stable@libav.org
This commit is contained in:
		
							parent
							
								
									ea1136baaf
								
							
						
					
					
						commit
						cacad1c058
					
				| @ -277,6 +277,11 @@ static av_cold int decode_init(AVCodecContext *avctx) | |||||||
|     int log2_max_num_subframes; |     int log2_max_num_subframes; | ||||||
|     int num_possible_block_sizes; |     int num_possible_block_sizes; | ||||||
| 
 | 
 | ||||||
|  |     if (!avctx->block_align) { | ||||||
|  |         av_log(avctx, AV_LOG_ERROR, "block_align is not set\n"); | ||||||
|  |         return AVERROR(EINVAL); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     s->avctx = avctx; |     s->avctx = avctx; | ||||||
|     avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT); |     avpriv_float_dsp_init(&s->fdsp, avctx->flags & CODEC_FLAG_BITEXACT); | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user