提交 52268def 编写于 作者: M Michael Niedermayer

avformat/thp: check fps value during probing

Fixes probetest failure
Signed-off-by: NMichael Niedermayer <michaelni@gmx.at>
上级 858ef562
......@@ -47,11 +47,16 @@ typedef struct ThpDemuxContext {
static int thp_probe(AVProbeData *p)
{
double d;
/* check file header */
if (AV_RL32(p->buf) == MKTAG('T', 'H', 'P', '\0'))
return AVPROBE_SCORE_MAX;
else
if (AV_RL32(p->buf) != MKTAG('T', 'H', 'P', '\0'))
return 0;
d = av_int2float(AV_RB32(p->buf + 16));
if (d < 0.1 || d > 1000 || isnan(d))
return AVPROBE_SCORE_MAX/4;
return AVPROBE_SCORE_MAX;
}
static int thp_read_header(AVFormatContext *s)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册