mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
avformat/thp: check fps value during probing
Fixes probetest failure Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
858ef56297
commit
52268def10
@ -47,11 +47,16 @@ typedef struct ThpDemuxContext {
|
|||||||
|
|
||||||
static int thp_probe(AVProbeData *p)
|
static int thp_probe(AVProbeData *p)
|
||||||
{
|
{
|
||||||
|
double d;
|
||||||
/* check file header */
|
/* check file header */
|
||||||
if (AV_RL32(p->buf) == MKTAG('T', 'H', 'P', '\0'))
|
if (AV_RL32(p->buf) != MKTAG('T', 'H', 'P', '\0'))
|
||||||
return AVPROBE_SCORE_MAX;
|
|
||||||
else
|
|
||||||
return 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)
|
static int thp_read_header(AVFormatContext *s)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user