From 9b879566789379631f02b83be367ca55c88a1ae9 Mon Sep 17 00:00:00 2001 From: Michel Bardiaux Date: Mon, 3 Nov 2003 13:26:22 +0000 Subject: av_log() patch by (Michel Bardiaux ) Originally committed as revision 2469 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/ac3enc.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libavcodec/ac3enc.c') diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c index 0bcd684f66..6510d981fa 100644 --- a/libavcodec/ac3enc.c +++ b/libavcodec/ac3enc.c @@ -464,7 +464,7 @@ static void compute_exp_strategy(uint8_t exp_strategy[NB_BLOCKS][AC3_MAX_CHANNEL for(i=1;i EXP_DIFF_THRESHOLD) exp_strategy[i][ch] = EXP_NEW; @@ -580,11 +580,11 @@ static int encode_exp(uint8_t encoded_exp[N/2], } #if defined(DEBUG) - printf("exponents: strategy=%d\n", exp_strategy); + av_log(AV_LOG_DEBUG, "exponents: strategy=%d\n", exp_strategy); for(i=0;i<=nb_groups * group_size;i++) { - printf("%d ", encoded_exp[i]); + av_log(AV_LOG_DEBUG, "%d ", encoded_exp[i]); } - printf("\n"); + av_log(AV_LOG_DEBUG, "\n"); #endif return 4 + (nb_groups / 3) * 7; @@ -746,7 +746,7 @@ static int compute_bit_allocation(AC3EncodeContext *s, bit_alloc(s, bap, encoded_exp, exp_strategy, frame_bits, csnroffst, 0) < 0) csnroffst -= SNR_INC1; if (csnroffst < 0) { - fprintf(stderr, "Yack, Error !!!\n"); + av_log(NULL, AV_LOG_ERROR, "Yack, Error !!!\n"); return -1; } while ((csnroffst + SNR_INC1) <= 63 && @@ -1021,7 +1021,7 @@ static void output_audio_block(AC3EncodeContext *s, #if defined(DEBUG) { static int count = 0; - printf("Block #%d (%d)\n", block_num, count++); + av_log(AV_LOG_DEBUG, "Block #%d (%d)\n", block_num, count++); } #endif /* exponent strategy */ -- cgit v1.2.3