summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-09-17 18:46:50 +0000
committerBaptiste Coudurier <baptiste.coudurier@gmail.com>2009-09-17 18:46:50 +0000
commitdb46c4e14d3346e91e7abd7ac05810d1dbddacb7 (patch)
treefb1465e8a05e330898ead4ff5e81f49790a4b7f7 /libavformat
parent5abfae79ca6fbcbec559f4743e1d8c07a4d91518 (diff)
print at debug level the score at which codec probing succedeed
Originally committed as revision 19899 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 373157bc83..4b65010967 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -315,12 +315,14 @@ AVInputFormat *av_probe_input_format(AVProbeData *pd, int is_opened){
return av_probe_input_format2(pd, is_opened, &score);
}
-static int set_codec_from_probe_data(AVStream *st, AVProbeData *pd, int score)
+static int set_codec_from_probe_data(AVFormatContext *s, AVStream *st, AVProbeData *pd, int score)
{
AVInputFormat *fmt;
fmt = av_probe_input_format2(pd, 1, &score);
if (fmt) {
+ av_log(s, AV_LOG_DEBUG, "Probe with size=%d, packets=%d detected %s with score=%d\n",
+ pd->buf_size, MAX_PROBE_PACKETS - st->probe_packets, fmt->name, score);
if (!strcmp(fmt->name, "mp3")) {
st->codec->codec_id = CODEC_ID_MP3;
st->codec->codec_type = CODEC_TYPE_AUDIO;
@@ -595,7 +597,7 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt)
memset(pd->buf+pd->buf_size, 0, AVPROBE_PADDING_SIZE);
if(av_log2(pd->buf_size) != av_log2(pd->buf_size - pkt->size)){
- set_codec_from_probe_data(st, pd, 1);
+ set_codec_from_probe_data(s, st, pd, 1);
if(st->codec->codec_id != CODEC_ID_PROBE){
pd->buf_size=0;
av_freep(&pd->buf);