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/h263dec.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/h263dec.c')
-rw-r--r-- | libavcodec/h263dec.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 1448287af5..ebce4dd479 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -219,11 +219,11 @@ static int decode_slice(MpegEncContext *s){ } return 0; }else if(ret==SLICE_NOEND){ - fprintf(stderr,"Slice mismatch at MB: %d\n", xy); + av_log(s->avctx, AV_LOG_ERROR, "Slice mismatch at MB: %d\n", xy); ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x+1, s->mb_y, (AC_END|DC_END|MV_END)&part_mask); return -1; } - fprintf(stderr,"Error at MB: %d\n", xy); + av_log(s->avctx, AV_LOG_ERROR, "Error at MB: %d\n", xy); ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, (AC_ERROR|DC_ERROR|MV_ERROR)&part_mask); return -1; @@ -281,17 +281,17 @@ static int decode_slice(MpegEncContext *s){ max_extra+= 256*256*256*64; if(left>max_extra){ - fprintf(stderr, "discarding %d junk bits at end, next would be %X\n", left, show_bits(&s->gb, 24)); + av_log(s->avctx, AV_LOG_ERROR, "discarding %d junk bits at end, next would be %X\n", left, show_bits(&s->gb, 24)); } else if(left<0){ - fprintf(stderr, "overreading %d bits\n", -left); + av_log(s->avctx, AV_LOG_ERROR, "overreading %d bits\n", -left); }else ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x-1, s->mb_y, AC_END|DC_END|MV_END); return 0; } - fprintf(stderr, "slice end not reached but screenspace end (%d left %06X, score= %d)\n", + av_log(s->avctx, AV_LOG_ERROR, "slice end not reached but screenspace end (%d left %06X, score= %d)\n", s->gb.size_in_bits - get_bits_count(&s->gb), show_bits(&s->gb, 24), s->padding_bug_score); @@ -415,7 +415,7 @@ uint64_t time= rdtsc(); }else if(s->codec_id==CODEC_ID_H263){ next= h263_find_frame_end(s, buf, buf_size); }else{ - fprintf(stderr, "this codec doesnt support truncated bitstreams\n"); + av_log(s->avctx, AV_LOG_ERROR, "this codec doesnt support truncated bitstreams\n"); return -1; } @@ -470,7 +470,7 @@ retry: /* skip if the header was thrashed */ if (ret < 0){ - fprintf(stderr, "header damaged\n"); + av_log(s->avctx, AV_LOG_ERROR, "header damaged\n"); return -1; } @@ -580,7 +580,7 @@ retry: } if(avctx->debug & FF_DEBUG_BUGS) - printf("bugs: %X lavc_build:%d xvid_build:%d divx_version:%d divx_build:%d %s\n", + av_log(s->avctx, AV_LOG_DEBUG, "bugs: %X lavc_build:%d xvid_build:%d divx_version:%d divx_build:%d %s\n", s->workaround_bugs, s->lavc_build, s->xvid_build, s->divx_version, s->divx_build, s->divx_packed ? "p" : ""); |