summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-11-03 18:06:54 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-11-03 18:06:54 +0000
commit3d0ef6dd52b7db3375249978113847d5dea361a7 (patch)
treee30f7eaaaaa789048968f9219b3a8b4320ba2b7d
parentea05d9c9c71f916b4dd3c62386286d1da09e0ad6 (diff)
av_log patch(2 of ?) by (Michel Bardiaux <mbardiaux at peaktime dot be>)
Originally committed as revision 2474 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/a52dec.c2
-rw-r--r--libavcodec/ac3enc.c10
-rw-r--r--libavcodec/common.c2
-rw-r--r--libavcodec/faad.c12
-rw-r--r--libavcodec/liba52/resample.c6
-rw-r--r--libavcodec/mpegaudio.c2
6 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/a52dec.c b/libavcodec/a52dec.c
index fb169c7ee3..a22391f7ff 100644
--- a/libavcodec/a52dec.c
+++ b/libavcodec/a52dec.c
@@ -190,7 +190,7 @@ static int a52_decode_frame(AVCodecContext *avctx,
/* No specific number of channel requested */
avctx->channels = s->channels;
else if (s->channels < avctx->channels) {
- fprintf(stderr, "ac3dec: AC3 Source channels are less than specified: output to %d channels.. (frmsize: %d)\n", s->channels, len);
+ av_log(avctx, AV_LOG_ERROR, "ac3dec: AC3 Source channels are less than specified: output to %d channels.. (frmsize: %d)\n", s->channels, len);
avctx->channels = s->channels;
}
avctx->bit_rate = bit_rate;
diff --git a/libavcodec/ac3enc.c b/libavcodec/ac3enc.c
index 6510d981fa..25314e3669 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<NB_BLOCKS;i++) {
exp_diff = calc_exp_diff(exp[i][ch], exp[i-1][ch], N/2);
#ifdef DEBUG
- av_log(AV_LOG_DEBUG, "exp_diff=%d\n", exp_diff);
+ av_log(NULL, AV_LOG_DEBUG, "exp_diff=%d\n", exp_diff);
#endif
if (exp_diff > 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)
- av_log(AV_LOG_DEBUG, "exponents: strategy=%d\n", exp_strategy);
+ av_log(NULL, AV_LOG_DEBUG, "exponents: strategy=%d\n", exp_strategy);
for(i=0;i<=nb_groups * group_size;i++) {
- av_log(AV_LOG_DEBUG, "%d ", encoded_exp[i]);
+ av_log(NULL, AV_LOG_DEBUG, "%d ", encoded_exp[i]);
}
- av_log(AV_LOG_DEBUG, "\n");
+ av_log(NULL, AV_LOG_DEBUG, "\n");
#endif
return 4 + (nb_groups / 3) * 7;
@@ -1021,7 +1021,7 @@ static void output_audio_block(AC3EncodeContext *s,
#if defined(DEBUG)
{
static int count = 0;
- av_log(AV_LOG_DEBUG, "Block #%d (%d)\n", block_num, count++);
+ av_log(NULL, AV_LOG_DEBUG, "Block #%d (%d)\n", block_num, count++);
}
#endif
/* exponent strategy */
diff --git a/libavcodec/common.c b/libavcodec/common.c
index f5bd81983c..96889813e3 100644
--- a/libavcodec/common.c
+++ b/libavcodec/common.c
@@ -282,7 +282,7 @@ static int build_table(VLC *vlc, int table_nb_bits,
nb = 1 << (table_nb_bits - n);
for(k=0;k<nb;k++) {
#ifdef DEBUG_VLC
- av_log(AV_LOG_DEBUG, "%4x: code=%d n=%d\n",
+ av_log(NULL, AV_LOG_DEBUG, "%4x: code=%d n=%d\n",
j, i, n);
#endif
if (table[j][1] /*bits*/ != 0) {
diff --git a/libavcodec/faad.c b/libavcodec/faad.c
index 6dfffd837d..ab48ef57d1 100644
--- a/libavcodec/faad.c
+++ b/libavcodec/faad.c
@@ -87,7 +87,7 @@ static int faac_init_mp4(AVCodecContext *avctx)
// else r = s->faacDecInit(s->faac_handle ... );
if (r < 0)
- fprintf(stderr, "faacDecInit2 failed r:%d sr:%ld ch:%d s:%d\n",
+ av_log(avctx, AV_LOG_ERROR, "faacDecInit2 failed r:%d sr:%ld ch:%d s:%d\n",
r, samplerate, channels, avctx->extradata_size);
return r;
@@ -109,7 +109,7 @@ static int faac_decode_frame(AVCodecContext *avctx,
//printf("DECODE FRAME %d, %d, %d - %p\n", buf_size, frame_info.samples, frame_info.bytesconsumed, out);
if (frame_info.error > 0) {
- fprintf(stderr, "faac: frame decodinf failed: %s\n",
+ av_log(avctx, AV_LOG_ERROR, "faac: frame decodinf failed: %s\n",
s->faacDecGetErrorMessage(frame_info.error));
return 0;
}
@@ -146,7 +146,7 @@ static int faac_decode_init(AVCodecContext *avctx)
s->handle = dlopen(libfaadname, RTLD_LAZY);
if (!s->handle)
{
- fprintf(stderr, "FAAD library: %s could not be opened! \n%s\n",
+ av_log(avctx, AV_LOG_ERROR, "FAAD library: %s could not be opened! \n%s\n",
libfaadname, dlerror());
return -1;
}
@@ -182,7 +182,7 @@ static int faac_decode_init(AVCodecContext *avctx)
}
if (err) {
dlclose(s->handle);
- fprintf(stderr, "FAAD library: cannot resolve %s in %s!\n",
+ av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot resolve %s in %s!\n",
err, libfaadname);
return -1;
}
@@ -190,7 +190,7 @@ static int faac_decode_init(AVCodecContext *avctx)
s->faac_handle = s->faacDecOpen();
if (!s->faac_handle) {
- fprintf(stderr, "FAAD library: cannot create handler!\n");
+ av_log(avctx, AV_LOG_ERROR, "FAAD library: cannot create handler!\n");
faac_decode_end(avctx);
return -1;
}
@@ -200,7 +200,7 @@ static int faac_decode_init(AVCodecContext *avctx)
if (faac_cfg) {
switch (avctx->bits_per_sample) {
- case 8: fprintf(stderr, "FAADlib unsupported bps %d\n", avctx->bits_per_sample); break;
+ case 8: av_log(avctx, AV_LOG_ERROR, "FAADlib unsupported bps %d\n", avctx->bits_per_sample); break;
default:
case 16:
faac_cfg->outputFormat = FAAD_FMT_16BIT;
diff --git a/libavcodec/liba52/resample.c b/libavcodec/liba52/resample.c
index bb7de9175e..07e2d69478 100644
--- a/libavcodec/liba52/resample.c
+++ b/libavcodec/liba52/resample.c
@@ -24,7 +24,7 @@ void* tmp;
if(mm_accel&MM_ACCEL_X86_MMX){
tmp=a52_resample_MMX(flags,chans);
if(tmp){
- if(a52_resample==NULL) fprintf(stderr, "Using MMX optimized resampler\n");
+ if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "Using MMX optimized resampler\n");
a52_resample=tmp;
return tmp;
}
@@ -33,11 +33,11 @@ void* tmp;
tmp=a52_resample_C(flags,chans);
if(tmp){
- if(a52_resample==NULL) fprintf(stderr, "No accelerated resampler found\n");
+ if(a52_resample==NULL) av_log(NULL, AV_LOG_INFO, "No accelerated resampler found\n");
a52_resample=tmp;
return tmp;
}
- fprintf(stderr, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans);
+ av_log(NULL, AV_LOG_ERROR, "Unimplemented resampler for mode 0x%X -> %d channels conversion - Contact MPlayer developers!\n", flags, chans);
return NULL;
}
diff --git a/libavcodec/mpegaudio.c b/libavcodec/mpegaudio.c
index f1bb551ace..fe79baa1d2 100644
--- a/libavcodec/mpegaudio.c
+++ b/libavcodec/mpegaudio.c
@@ -117,7 +117,7 @@ static int MPA_encode_init(AVCodecContext *avctx)
s->alloc_table = alloc_tables[table];
#ifdef DEBUG
- av_log(AV_LOG_DEBUG, "%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n",
+ av_log(avctx, AV_LOG_DEBUG, "%d kb/s, %d Hz, frame_size=%d bits, table=%d, padincr=%x\n",
bitrate, freq, s->frame_size, table, s->frame_frac_incr);
#endif