| 
																	
																	
																		
																	
																	
																 | 
																@@ -293,6 +293,7 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																    band->is_empty = get_bits1(&ctx->gb); | 
																 | 
																 | 
																    band->is_empty = get_bits1(&ctx->gb); | 
															
														
														
													
														
															
																 | 
																 | 
																    if (!band->is_empty) { | 
																 | 
																 | 
																    if (!band->is_empty) { | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        int old_blk_size = band->blk_size; | 
															
														
														
													
														
															
																 | 
																 | 
																        /* skip header size | 
																 | 
																 | 
																        /* skip header size | 
															
														
														
													
														
															
																 | 
																 | 
																         * If header size is not given, header size is 4 bytes. */ | 
																 | 
																 | 
																         * If header size is not given, header size is 4 bytes. */ | 
															
														
														
													
														
															
																 | 
																 | 
																        if (get_bits1(&ctx->gb)) | 
																 | 
																 | 
																        if (get_bits1(&ctx->gb)) | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																		
																	
																	
																 | 
																@@ -378,6 +379,13 @@ static int decode_band_hdr(IVI45DecContext *ctx, IVIBandDesc *band, | 
															
														
														
													
														
															
																 | 
																 | 
																                                      band->quant_mat); | 
																 | 
																 | 
																                                      band->quant_mat); | 
															
														
														
													
														
															
																 | 
																 | 
																                return AVERROR_INVALIDDATA; | 
																 | 
																 | 
																                return AVERROR_INVALIDDATA; | 
															
														
														
													
														
															
																 | 
																 | 
																            } | 
																 | 
																 | 
																            } | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																        } else { | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																            if (old_blk_size != band->blk_size) { | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                av_log(avctx, AV_LOG_ERROR, | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                       "The band block size does not match the configuration " | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                       "inherited\n"); | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																                return AVERROR_INVALIDDATA; | 
															
														
														
													
														
															
																 | 
																 | 
																 | 
																 | 
																 | 
																            } | 
															
														
														
													
														
															
																 | 
																 | 
																        } | 
																 | 
																 | 
																        } | 
															
														
														
													
														
															
																 | 
																 | 
																
  | 
																 | 
																 | 
																
  | 
															
														
														
													
														
															
																 | 
																 | 
																        /* decode block huffman codebook */ | 
																 | 
																 | 
																        /* decode block huffman codebook */ | 
															
														
														
													
												
													
														
															
																| 
																	
																		
																	
																	
																	
																 | 
																
  |