comparison lcldec.c @ 9772:2771fff83016 libavcodec

100l, the compression field in lcl extradata must be interpreted as int8_t, not uint8_t to allow -1 for "no compression". The original code worked, but only when char was signed.
author reimar
date Sun, 31 May 2009 10:50:54 +0000
parents 85c99c1335bc
children 270ae6dc6352
comparison
equal deleted inserted replaced
9771:85c99c1335bc 9772:2771fff83016
510 av_log(avctx, AV_LOG_ERROR, "Unsupported image format %d.\n", c->imgtype); 510 av_log(avctx, AV_LOG_ERROR, "Unsupported image format %d.\n", c->imgtype);
511 return 1; 511 return 1;
512 } 512 }
513 513
514 /* Detect compression method */ 514 /* Detect compression method */
515 c->compression = avctx->extradata[5]; 515 c->compression = (int8_t)avctx->extradata[5];
516 switch (avctx->codec_id) { 516 switch (avctx->codec_id) {
517 case CODEC_ID_MSZH: 517 case CODEC_ID_MSZH:
518 switch (c->compression) { 518 switch (c->compression) {
519 case COMP_MSZH: 519 case COMP_MSZH:
520 av_log(avctx, AV_LOG_DEBUG, "Compression enabled.\n"); 520 av_log(avctx, AV_LOG_DEBUG, "Compression enabled.\n");