diff options
author | Diego Biurrun <diego@biurrun.de> | 2011-04-29 17:27:01 +0200 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2011-04-29 17:27:01 +0200 |
commit | 045dd4b9287551443e655b313417fd776f52aab0 (patch) | |
tree | 54581408e4fba906927eda540049b2fd924b71a2 /libavformat | |
parent | d1be646e906487b395190af1d6dd8d33c22bf25f (diff) | |
download | ffmpeg-045dd4b9287551443e655b313417fd776f52aab0.tar.gz |
Replace some commented-out debug printf() / av_log() messages with av_dlog().
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mpeg.c | 7 | ||||
-rw-r--r-- | libavformat/mpegenc.c | 11 | ||||
-rw-r--r-- | libavformat/mpegts.c | 6 | ||||
-rw-r--r-- | libavformat/oggdec.c | 16 | ||||
-rw-r--r-- | libavformat/rmdec.c | 16 | ||||
-rw-r--r-- | libavformat/utils.c | 16 |
6 files changed, 26 insertions, 46 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 68b685cc29..0b663ab512 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -569,10 +569,9 @@ static int mpegps_read_packet(AVFormatContext *s, pkt->dts = dts; pkt->pos = dummy_pos; pkt->stream_index = st->index; -#if 0 - av_log(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n", - pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0, pkt->size); -#endif + av_dlog(s, AV_LOG_DEBUG, "%d: pts=%0.3f dts=%0.3f size=%d\n", + pkt->stream_index, pkt->pts / 90000.0, pkt->dts / 90000.0, + pkt->size); return 0; } diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index 0e0164511a..28ca1cbd5b 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -662,10 +662,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index, id = stream->id; -#if 0 - printf("packet ID=%2x PTS=%0.3f\n", - id, pts / 90000.0); -#endif + av_dlog(ctx, "packet ID=%2x PTS=%0.3f\n", id, pts / 90000.0); buf_ptr = buffer; @@ -1078,10 +1075,8 @@ retry: best_dts= pkt_desc->dts; } -#if 0 - av_log(ctx, AV_LOG_DEBUG, "bumping scr, scr:%f, dts:%f\n", - scr/90000.0, best_dts/90000.0); -#endif + av_dlog(ctx, AV_LOG_DEBUG, "bumping scr, scr:%f, dts:%f\n", + scr / 90000.0, best_dts / 90000.0); if(best_dts == INT64_MAX) return 0; diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index d7f2c0c957..2ff6e55c57 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -1538,10 +1538,8 @@ static int mpegts_read_header(AVFormatContext *s, s->bit_rate = (TS_PACKET_SIZE * 8) * 27e6 / ts->pcr_incr; st->codec->bit_rate = s->bit_rate; st->start_time = ts->cur_pcr; -#if 0 - av_log(ts->stream, AV_LOG_DEBUG, "start=%0.3f pcr=%0.3f incr=%d\n", - st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr); -#endif + av_dlog(ts->stream, AV_LOG_DEBUG, "start=%0.3f pcr=%0.3f incr=%d\n", + st->start_time / 1000000.0, pcrs[0] / 27e6, ts->pcr_incr); } avio_seek(pb, pos, SEEK_SET); diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c index 8d96320b3f..07969c816f 100644 --- a/libavformat/oggdec.c +++ b/libavformat/oggdec.c @@ -316,9 +316,7 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo int complete = 0; int segp = 0, psize = 0; -#if 0 - av_log (s, AV_LOG_DEBUG, "ogg_packet: curidx=%i\n", ogg->curidx); -#endif + av_dlog(s, AV_LOG_DEBUG, "ogg_packet: curidx=%i\n", ogg->curidx); do{ idx = ogg->curidx; @@ -330,11 +328,9 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo os = ogg->streams + idx; -#if 0 - av_log (s, AV_LOG_DEBUG, + av_dlog(s, AV_LOG_DEBUG, "ogg_packet: idx=%d pstart=%d psize=%d segp=%d nsegs=%d\n", idx, os->pstart, os->psize, os->segp, os->nsegs); -#endif if (!os->codec){ if (os->header < 0){ @@ -366,11 +362,9 @@ ogg_packet (AVFormatContext * s, int *str, int *dstart, int *dsize, int64_t *fpo } }while (!complete); -#if 0 - av_log (s, AV_LOG_DEBUG, + av_dlog(s, AV_LOG_DEBUG, "ogg_packet: idx %i, frame size %i, start %i\n", idx, os->psize, os->pstart); -#endif if (os->granule == -1) av_log(s, AV_LOG_WARNING, "Page at %"PRId64" is missing granule\n", os->page_pos); @@ -451,9 +445,7 @@ ogg_get_headers (AVFormatContext * s) return -1; }while (!ogg->headers); -#if 0 - av_log (s, AV_LOG_DEBUG, "found headers\n"); -#endif + av_dlog(s, AV_LOG_DEBUG, "found headers\n"); return 0; } diff --git a/libavformat/rmdec.c b/libavformat/rmdec.c index bcf55fddfa..843706dec3 100644 --- a/libavformat/rmdec.c +++ b/libavformat/rmdec.c @@ -414,15 +414,13 @@ static int rm_read_header(AVFormatContext *s, AVFormatParameters *ap) tag = avio_rl32(pb); tag_size = avio_rb32(pb); avio_rb16(pb); -#if 0 - printf("tag=%c%c%c%c (%08x) size=%d\n", - (tag) & 0xff, - (tag >> 8) & 0xff, - (tag >> 16) & 0xff, - (tag >> 24) & 0xff, - tag, - tag_size); -#endif + av_dlog(s, "tag=%c%c%c%c (%08x) size=%d\n", + (tag ) & 0xff, + (tag >> 8) & 0xff, + (tag >> 16) & 0xff, + (tag >> 24) & 0xff, + tag, + tag_size); if (tag_size < 10 && tag != MKTAG('D', 'A', 'T', 'A')) return -1; switch(tag) { diff --git a/libavformat/utils.c b/libavformat/utils.c index 88e9a49e87..6d6c8308ca 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1974,22 +1974,20 @@ static void av_estimate_timings(AVFormatContext *ic, int64_t old_offset) } av_update_stream_timings(ic); -#if 0 { int i; AVStream *st; for(i = 0;i < ic->nb_streams; i++) { st = ic->streams[i]; - printf("%d: start_time: %0.3f duration: %0.3f\n", - i, (double)st->start_time / AV_TIME_BASE, - (double)st->duration / AV_TIME_BASE); + av_dlog(ic, "%d: start_time: %0.3f duration: %0.3f\n", i, + (double) st->start_time / AV_TIME_BASE, + (double) st->duration / AV_TIME_BASE); } - printf("stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n", - (double)ic->start_time / AV_TIME_BASE, - (double)ic->duration / AV_TIME_BASE, - ic->bit_rate / 1000); + av_dlog(ic, "stream: start_time: %0.3f duration: %0.3f bitrate=%d kb/s\n", + (double) ic->start_time / AV_TIME_BASE, + (double) ic->duration / AV_TIME_BASE, + ic->bit_rate / 1000); } -#endif } static int has_codec_parameters(AVCodecContext *enc) |