diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2009-06-18 00:22:08 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2009-06-18 00:22:08 +0000 |
commit | 71ee65155916730b124064e51f090c7fc0f59b71 (patch) | |
tree | a75ae274065fd0fe96e5440d517286cb71643a87 | |
parent | 2da4e5e3e17ccf87b85f0956e29d311e0cc71008 (diff) | |
download | ffmpeg-71ee65155916730b124064e51f090c7fc0f59b71.tar.gz |
Print why av_find_stream_info() failed, this is a rather common question
during debugging ...
Originally committed as revision 19217 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/utils.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c index dc188853e3..99ac30cdd5 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2042,6 +2042,7 @@ int av_find_stream_info(AVFormatContext *ic) for(;;) { if(url_interrupt_cb()){ ret= AVERROR(EINTR); + av_log(ic, AV_LOG_DEBUG, "interrupted\n"); break; } @@ -2066,12 +2067,14 @@ int av_find_stream_info(AVFormatContext *ic) if (!(ic->ctx_flags & AVFMTCTX_NOHEADER)) { /* if we found the info for all the codecs, we can stop */ ret = count; + av_log(ic, AV_LOG_DEBUG, "All info found\n"); break; } } /* we did not get all the codec info, but we read too much data */ if (read_size >= MAX_READ_SIZE) { ret = count; + av_log(ic, AV_LOG_DEBUG, "MAX_READ_SIZE reached\n"); break; } @@ -2106,8 +2109,10 @@ int av_find_stream_info(AVFormatContext *ic) st = ic->streams[pkt->stream_index]; if(codec_info_nb_frames[st->index]>1) { - if (st->time_base.den > 0 && av_rescale_q(codec_info_duration[st->index], st->time_base, AV_TIME_BASE_Q) >= ic->max_analyze_duration) + if (st->time_base.den > 0 && av_rescale_q(codec_info_duration[st->index], st->time_base, AV_TIME_BASE_Q) >= ic->max_analyze_duration){ + av_log(ic, AV_LOG_DEBUG, "max_analyze_duration reached\n"); break; + } codec_info_duration[st->index] += pkt->duration; } if (pkt->duration != 0) |