comparison tiff.c @ 8428:8bf9f50ed64f libavcodec

Some TIFFs declare -1 for the single strip height
author kostya
date Mon, 22 Dec 2008 06:47:51 +0000
parents 2dfb0cc864b6
children b3ecaba81501
comparison
equal deleted inserted replaced
8427:2dfb0cc864b6 8428:8bf9f50ed64f
291 av_log(s->avctx, AV_LOG_ERROR, "Unknown compression method %i\n", s->compr); 291 av_log(s->avctx, AV_LOG_ERROR, "Unknown compression method %i\n", s->compr);
292 return -1; 292 return -1;
293 } 293 }
294 break; 294 break;
295 case TIFF_ROWSPERSTRIP: 295 case TIFF_ROWSPERSTRIP:
296 if(type == TIFF_LONG && value == -1)
297 value = s->avctx->height;
296 if(value < 1){ 298 if(value < 1){
297 av_log(s->avctx, AV_LOG_ERROR, "Incorrect value of rows per strip\n"); 299 av_log(s->avctx, AV_LOG_ERROR, "Incorrect value of rows per strip\n");
298 return -1; 300 return -1;
299 } 301 }
300 s->rps = value; 302 s->rps = value;