aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-12-13 19:31:42 +0100
committerAnton Khirnov <anton@khirnov.net>2012-12-14 07:10:48 +0100
commit07acdd651d1e2f4cfa5f610e616e70e323bb69cd (patch)
treed687fc5316f0041b936a7eb91707926dd76e4df3
parent8ab42021f25390f3539a137fea6430d5fc1e0bf6 (diff)
downloadffmpeg-07acdd651d1e2f4cfa5f610e616e70e323bb69cd.tar.gz
ivi_common: use proper logging context in ivi_decode_blocks().
-rw-r--r--libavcodec/ivi_common.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libavcodec/ivi_common.c b/libavcodec/ivi_common.c
index 3338bbfbb6..9b81094411 100644
--- a/libavcodec/ivi_common.c
+++ b/libavcodec/ivi_common.c
@@ -384,7 +384,8 @@ static int ivi_dec_tile_data_size(GetBitContext *gb)
* @param[in] tile pointer to the tile descriptor
* @return result code: 0 - OK, -1 = error (corrupted blocks data)
*/
-static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile)
+static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile,
+ AVCodecContext *avctx)
{
int mbn, blk, num_blocks, num_coeffs, blk_size, scan_pos, run, val,
pos, is_intra, mc_type = 0, mv_x, mv_y, col_mask;
@@ -475,7 +476,7 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile
val = IVI_TOSIGNED((hi << 6) | lo); /* merge them and convert into signed val */
} else {
if (sym >= 256U) {
- av_log(NULL, AV_LOG_ERROR, "Invalid sym encountered: %d.\n", sym);
+ av_log(avctx, AV_LOG_ERROR, "Invalid sym encountered: %d.\n", sym);
return -1;
}
run = rvmap->runtab[sym];
@@ -489,7 +490,7 @@ static int ivi_decode_blocks(GetBitContext *gb, IVIBandDesc *band, IVITile *tile
pos = band->scan[scan_pos];
if (!val)
- av_dlog(NULL, "Val = 0 encountered!\n");
+ av_dlog(avctx, "Val = 0 encountered!\n");
q = (base_tab[pos] * quant) >> 9;
if (q > 1)
@@ -766,7 +767,7 @@ static int decode_band(IVI45DecContext *ctx,
if (result < 0)
break;
- result = ivi_decode_blocks(&ctx->gb, band, tile);
+ result = ivi_decode_blocks(&ctx->gb, band, tile, avctx);
if (result < 0 || ((get_bits_count(&ctx->gb) - pos) >> 3) != tile->data_size) {
av_log(avctx, AV_LOG_ERROR, "Corrupted tile data encountered!\n");
break;