Mercurial > libavcodec.hg
comparison lcldec.c @ 9754:269e16268683 libavcodec
Move variable into block where it is used, avoiding a unused variable
warning if the zlib decoder is disabled.
author | reimar |
---|---|
date | Sun, 31 May 2009 09:27:07 +0000 |
parents | ddd880ab64c6 |
children | bd5d76a5ffac |
comparison
equal
deleted
inserted
replaced
9753:ddd880ab64c6 | 9754:269e16268683 |
---|---|
461 { | 461 { |
462 LclDecContext * const c = avctx->priv_data; | 462 LclDecContext * const c = avctx->priv_data; |
463 unsigned int basesize = avctx->width * avctx->height; | 463 unsigned int basesize = avctx->width * avctx->height; |
464 unsigned int max_basesize = ((avctx->width + 3) & ~3) * ((avctx->height + 3) & ~3); | 464 unsigned int max_basesize = ((avctx->width + 3) & ~3) * ((avctx->height + 3) & ~3); |
465 unsigned int max_decomp_size; | 465 unsigned int max_decomp_size; |
466 int zret; // Zlib return code | |
467 | 466 |
468 c->pic.data[0] = NULL; | 467 c->pic.data[0] = NULL; |
469 | 468 |
470 #if CONFIG_ZLIB_DECODER | 469 #if CONFIG_ZLIB_DECODER |
471 // Needed if zlib unused or init aborted before inflateInit | 470 // Needed if zlib unused or init aborted before inflateInit |
593 av_log(avctx, AV_LOG_ERROR, "Unknown flag set (%d).\n", c->flags); | 592 av_log(avctx, AV_LOG_ERROR, "Unknown flag set (%d).\n", c->flags); |
594 | 593 |
595 /* If needed init zlib */ | 594 /* If needed init zlib */ |
596 #if CONFIG_ZLIB_DECODER | 595 #if CONFIG_ZLIB_DECODER |
597 if (avctx->codec_id == CODEC_ID_ZLIB) { | 596 if (avctx->codec_id == CODEC_ID_ZLIB) { |
597 int zret; | |
598 c->zstream.zalloc = Z_NULL; | 598 c->zstream.zalloc = Z_NULL; |
599 c->zstream.zfree = Z_NULL; | 599 c->zstream.zfree = Z_NULL; |
600 c->zstream.opaque = Z_NULL; | 600 c->zstream.opaque = Z_NULL; |
601 zret = inflateInit(&c->zstream); | 601 zret = inflateInit(&c->zstream); |
602 if (zret != Z_OK) { | 602 if (zret != Z_OK) { |