You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	jpeg2000deci/j2kdec: fix sizeof types
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
		| @@ -792,11 +792,11 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, | ||||
|     int bpass_csty_symbol = JPEG2000_CBLK_BYPASS & codsty->cblk_style; | ||||
|     int vert_causal_ctx_csty_symbol = JPEG2000_CBLK_VSC & codsty->cblk_style; | ||||
|  | ||||
|     for (y = 0; y < height+2; y++) | ||||
|         memset(t1->flags[y], 0, (width + 2)*sizeof(int)); | ||||
|  | ||||
|     for (y = 0; y < height; y++) | ||||
|         memset(t1->data[y], 0, width*sizeof(int)); | ||||
|         memset(t1->data[y], 0, width * sizeof(**t1->data)); | ||||
|  | ||||
|     for (y = 0; y < height+2; y++) | ||||
|         memset(t1->flags[y], 0, (width + 2)*sizeof(**t1->flags)); | ||||
|  | ||||
|     cblk->data[cblk->length] = 0xff; | ||||
|     cblk->data[cblk->length+1] = 0xff; | ||||
|   | ||||
| @@ -876,13 +876,13 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty, | ||||
|     int passno = cblk->npasses, pass_t = 2, bpno = cblk->nonzerobits - 1, y; | ||||
|  | ||||
|     for (y = 0; y < height; y++) | ||||
|         memset(t1->data[y], 0, width * sizeof(width)); | ||||
|         memset(t1->data[y], 0, width * sizeof(**t1->data)); | ||||
|  | ||||
|     /* If code-block contains no compressed data: nothing to do. */ | ||||
|     if (!cblk->length) | ||||
|         return 0; | ||||
|     for (y = 0; y < height + 2; y++) | ||||
|         memset(t1->flags[y], 0, (width + 2) * sizeof(width)); | ||||
|         memset(t1->flags[y], 0, (width + 2) * sizeof(**t1->flags)); | ||||
|  | ||||
|     cblk->data[cblk->length]     = 0xff; | ||||
|     cblk->data[cblk->length + 1] = 0xff; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user