summaryrefslogtreecommitdiff
path: root/libavformat/avidec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-01 15:51:40 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-01 16:12:38 +0200
commit31ab1575e59e33957864d1bdf13253f8d366ccba (patch)
tree074dd6605a3d7e0a42b6cd12d2f071fe25d3d25a /libavformat/avidec.c
parentadc5539e7b94a94114d591d83e7ae63f52b5916f (diff)
parent1218777ffd152287244349d4ff9e1cbc84fa2c54 (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: avcodec: Convert some commented-out printf/av_log instances to av_dlog avcodec: Drop silly and/or broken printf debug output avcodec: Drop some silly commented-out av_log() invocations avformat: Convert some commented-out printf/av_log instances to av_dlog avformat: Remove non-compiling and/or silly commented-out printf/av_log statements Remove some silly disabled code. ac3dec: ensure get_buffer() gets a buffer for the correct number of channels Conflicts: libavcodec/dnxhddec.c libavcodec/ffv1.c libavcodec/h264.c libavcodec/h264_parser.c libavcodec/mjpegdec.c libavcodec/motion_est_template.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo_enc.c libavcodec/put_bits.h libavcodec/ratecontrol.c libavcodec/wmaenc.c libavdevice/timefilter.c libavformat/asfdec.c libavformat/avidec.c libavformat/avienc.c libavformat/flvenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/avidec.c')
-rw-r--r--libavformat/avidec.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/libavformat/avidec.c b/libavformat/avidec.c
index de945829f4..b4c5fe8d0c 100644
--- a/libavformat/avidec.c
+++ b/libavformat/avidec.c
@@ -545,7 +545,8 @@ static int avi_read_header(AVFormatContext *s)
}
ast->sample_size = avio_rl32(pb); /* sample ssize */
ast->cum_len *= FFMAX(1, ast->sample_size);
-// av_log(s, AV_LOG_DEBUG, "%d %d %d %d\n", ast->rate, ast->scale, ast->start, ast->sample_size);
+ av_dlog(s, "%"PRIu32" %"PRIu32" %d\n",
+ ast->rate, ast->scale, ast->sample_size);
switch(tag1) {
case MKTAG('v', 'i', 'd', 's'):
@@ -743,7 +744,9 @@ static int avi_read_header(AVFormatContext *s)
if(active_aspect.num && active_aspect.den && active.num && active.den){
st->sample_aspect_ratio= av_div_q(active_aspect, active);
-//av_log(s, AV_LOG_ERROR, "vprp %d/%d %d/%d\n", active_aspect.num, active_aspect.den, active.num, active.den);
+ av_dlog(s, "vprp %d/%d %d/%d\n",
+ active_aspect.num, active_aspect.den,
+ active.num, active.den);
}
size -= 9*4;
}
@@ -921,7 +924,8 @@ start_sync:
size= d[4] + (d[5]<<8) + (d[6]<<16) + (d[7]<<24);
n= get_stream_idx(d+2);
-//av_log(s, AV_LOG_DEBUG, "%X %X %X %X %X %X %X %X %"PRId64" %d %d\n", d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
+ av_dlog(s, "%X %X %X %X %X %X %X %X %"PRId64" %u %d\n",
+ d[0], d[1], d[2], d[3], d[4], d[5], d[6], d[7], i, size, n);
if(i + (uint64_t)size > avi->fsize || d[0] > 127)
continue;
@@ -931,7 +935,6 @@ start_sync:
||(d[0] == 'J' && d[1] == 'U' && d[2] == 'N' && d[3] == 'K')
||(d[0] == 'i' && d[1] == 'd' && d[2] == 'x' && d[3] == '1')){
avio_skip(pb, size);
-//av_log(s, AV_LOG_DEBUG, "SKIP\n");
goto start_sync;
}
@@ -1010,7 +1013,6 @@ start_sync:
if (exit_early)
return 0;
-//av_log(s, AV_LOG_DEBUG, "OK\n");
if(d[2]*256+d[3] == ast->prefix)
ast->prefix_count++;
else{
@@ -1073,7 +1075,8 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
ts = av_rescale_q(ts, st->time_base, (AVRational){FFMAX(1, ast->sample_size), AV_TIME_BASE});
-// av_log(s, AV_LOG_DEBUG, "%"PRId64" %d/%d %"PRId64"\n", ts, st->time_base.num, st->time_base.den, ast->frame_offset);
+ av_dlog(s, "%"PRId64" %d/%d %"PRId64"\n", ts,
+ st->time_base.num, st->time_base.den, ast->frame_offset);
if(ts < best_ts){
best_ts= ts;
best_st= st;
@@ -1093,13 +1096,11 @@ static int avi_read_packet(AVFormatContext *s, AVPacket *pkt)
best_ast->frame_offset= best_st->index_entries[i].timestamp;
}
-// av_log(s, AV_LOG_DEBUG, "%d\n", i);
if(i>=0){
int64_t pos= best_st->index_entries[i].pos;
pos += best_ast->packet_size - best_ast->remaining;
if(avio_seek(s->pb, pos + 8, SEEK_SET) < 0)
return AVERROR_EOF;
-// av_log(s, AV_LOG_DEBUG, "pos=%"PRId64"\n", pos);
av_assert0(best_ast->remaining <= best_ast->packet_size);
@@ -1168,7 +1169,9 @@ resync:
// pkt->dts += ast->start;
if(ast->sample_size)
pkt->dts /= ast->sample_size;
-//av_log(s, AV_LOG_DEBUG, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n", pkt->dts, ast->frame_offset, ast->scale, ast->rate, ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
+ av_dlog(s, "dts:%"PRId64" offset:%"PRId64" %d/%d smpl_siz:%d base:%d st:%d size:%d\n",
+ pkt->dts, ast->frame_offset, ast->scale, ast->rate,
+ ast->sample_size, AV_TIME_BASE, avi->stream_index, size);
pkt->stream_index = avi->stream_index;
if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) {
@@ -1457,7 +1460,8 @@ static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp
pos = st->index_entries[index].pos;
timestamp = st->index_entries[index].timestamp / FFMAX(ast->sample_size, 1);
-// av_log(s, AV_LOG_DEBUG, "XX %"PRId64" %d %"PRId64"\n", timestamp, index, st->index_entries[index].timestamp);
+ av_dlog(s, "XX %"PRId64" %d %"PRId64"\n",
+ timestamp, index, st->index_entries[index].timestamp);
if (CONFIG_DV_DEMUXER && avi->dv_demux) {
/* One and only one real stream for DV in AVI, and it has video */