summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-05-12 20:41:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-12 20:45:03 +0200
commitd05588e21e4744ae6a47192dc2da2844d6934a5d (patch)
tree995143f360c1ad6d0df2afa94f59aa31d3a1795f
parentab21acecc72a0299895583cf83347ab5e2444b71 (diff)
avformat/utils: limit probe score in the id3 case only if there is a chance that data after the id3 tag will become available
Fixes ticket3327 (sample.mp3) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/utils.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/utils.c b/libavformat/utils.c
index 4f5b310d83..ce5dbdfe0c 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -251,6 +251,8 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
if (lpd.buf_size > id3len + 16) {
lpd.buf += id3len;
lpd.buf_size -= id3len;
+ } else if (id3len >= PROBE_BUF_MAX) {
+ nodat = 2;
} else
nodat = 1;
}
@@ -274,7 +276,7 @@ AVInputFormat *av_probe_input_format3(AVProbeData *pd, int is_opened,
} else if (score == score_max)
fmt = NULL;
}
- if (nodat)
+ if (nodat == 1)
score_max = FFMIN(AVPROBE_SCORE_EXTENSION / 2 - 1, score_max);
*score_ret = score_max;