diff options
author | Michel Bardiaux <mbardiaux@peaktime.be> | 2003-11-03 13:26:22 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2003-11-03 13:26:22 +0000 |
commit | 9b879566789379631f02b83be367ca55c88a1ae9 (patch) | |
tree | ee2b274b74329eb94548dc6c85bc966485c75d2a /libavcodec/4xm.c | |
parent | 8bae9ddc91f6a083d420494bbd652d8258649066 (diff) | |
download | ffmpeg-9b879566789379631f02b83be367ca55c88a1ae9.tar.gz |
av_log() patch by (Michel Bardiaux <mbardiaux at peaktime dot be>)
Originally committed as revision 2469 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r-- | libavcodec/4xm.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c index 03e4a175c9..6544d88d0f 100644 --- a/libavcodec/4xm.c +++ b/libavcodec/4xm.c @@ -333,7 +333,7 @@ static int decode_p_frame(FourXContext *f, uint8_t *buf, int length){ const int wordstream_size= get32(buf+12); if(bitstream_size+ bytestream_size+ wordstream_size + 20 != length) - printf("lengths %d %d %d %d\n", bitstream_size, bytestream_size, wordstream_size, + av_log(f->avctx, AV_LOG_ERROR, "lengths %d %d %d %d\n", bitstream_size, bytestream_size, wordstream_size, bitstream_size+ bytestream_size+ wordstream_size - length); f->bitstream_buffer= av_fast_realloc(f->bitstream_buffer, &f->bitstream_buffer_size, bitstream_size + FF_INPUT_BUFFER_PADDING_SIZE); @@ -354,7 +354,7 @@ static int decode_p_frame(FourXContext *f, uint8_t *buf, int length){ } if(bitstream_size != (get_bits_count(&f->gb)+31)/32*4) - printf(" %d %d %d bytes left\n", + av_log(f->avctx, AV_LOG_ERROR, " %d %d %d bytes left\n", bitstream_size - (get_bits_count(&f->gb)+31)/32*4, bytestream_size - (f->bytestream - (buf + 20 + bitstream_size + wordstream_size)), wordstream_size - (((uint8_t*)f->wordstream) - (buf + 20 + bitstream_size)) @@ -373,7 +373,7 @@ static int decode_i_block(FourXContext *f, DCTELEM *block){ /* DC coef */ val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3); if (val>>4){ - printf("error dc run != 0\n"); + av_log(f->avctx, AV_LOG_ERROR, "error dc run != 0\n"); } if(val) @@ -396,7 +396,7 @@ static int decode_i_block(FourXContext *f, DCTELEM *block){ level = get_xbits(&f->gb, code & 0xf); i += code >> 4; if (i >= 64) { - printf("run %d oveflow\n", i); + av_log(f->avctx, AV_LOG_ERROR, "run %d oveflow\n", i); return 0; } @@ -535,7 +535,7 @@ static uint8_t *read_huffman_tables(FourXContext *f, uint8_t * const buf){ for(node= j; up[node] != -1; node= up[node]){ bits += flag[node]<<len; len++; - if(len > 31) printf("vlc length overflow\n"); //can this happen at all ? + if(len > 31) av_log(f->avctx, AV_LOG_ERROR, "vlc length overflow\n"); //can this happen at all ? } bits_tab[j]= bits; @@ -561,7 +561,7 @@ static int decode_i_frame(FourXContext *f, uint8_t *buf, int length){ uint8_t *prestream= buf + bitstream_size + 12; if(prestream_size + bitstream_size + 12 != length) - fprintf(stderr, "size missmatch %d %d %d\n", prestream_size, bitstream_size, length); + av_log(f->avctx, AV_LOG_ERROR, "size missmatch %d %d %d\n", prestream_size, bitstream_size, length); prestream= read_huffman_tables(f, prestream); @@ -586,7 +586,7 @@ static int decode_i_frame(FourXContext *f, uint8_t *buf, int length){ } if(get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3) != 256) - printf("end missmatch\n"); + av_log(f->avctx, AV_LOG_ERROR, "end missmatch\n"); return 0; } @@ -609,7 +609,7 @@ static int decode_frame(AVCodecContext *avctx, frame_4cc= get32(buf); if(buf_size != get32(buf+4)+8){ - fprintf(stderr, "size missmatch %d %d\n", buf_size, get32(buf+4)); + av_log(f->avctx, AV_LOG_ERROR, "size missmatch %d %d\n", buf_size, get32(buf+4)); } if(frame_4cc == ff_get_fourcc("cfrm")){ @@ -621,7 +621,7 @@ static int decode_frame(AVCodecContext *avctx, for(i=0; i<CFRAME_BUFFER_COUNT; i++){ if(f->cfrm[i].id && f->cfrm[i].id < avctx->frame_number) - printf("lost c frame %d\n", f->cfrm[i].id); + av_log(f->avctx, AV_LOG_ERROR, "lost c frame %d\n", f->cfrm[i].id); } for(i=0; i<CFRAME_BUFFER_COUNT; i++){ @@ -645,7 +645,7 @@ static int decode_frame(AVCodecContext *avctx, frame_size= cfrm->size; if(id != avctx->frame_number){ - printf("cframe id missmatch %d %d\n", id, avctx->frame_number); + av_log(f->avctx, AV_LOG_ERROR, "cframe id missmatch %d %d\n", id, avctx->frame_number); } cfrm->size= cfrm->id= 0; @@ -671,7 +671,7 @@ static int decode_frame(AVCodecContext *avctx, p->reference= 1; if(avctx->get_buffer(avctx, p) < 0){ - fprintf(stderr, "get_buffer() failed\n"); + av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); return -1; } @@ -684,9 +684,9 @@ static int decode_frame(AVCodecContext *avctx, if(decode_p_frame(f, buf, frame_size) < 0) return -1; }else if(frame_4cc == ff_get_fourcc("snd_")){ - printf("ignoring snd_ chunk length:%d\n", buf_size); + av_log(avctx, AV_LOG_ERROR, "ignoring snd_ chunk length:%d\n", buf_size); }else{ - printf("ignoring unknown chunk length:%d\n", buf_size); + av_log(avctx, AV_LOG_ERROR, "ignoring unknown chunk length:%d\n", buf_size); } #if 0 |