mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
Do not return values above AVPROBE_SCORE_MAX from probe().
Originally committed as revision 19857 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2a3caca2b1
commit
0535f919d5
@ -35,7 +35,7 @@ static int nc_probe(AVProbeData *probe_packet)
|
|||||||
size = AV_RL16(probe_packet->buf + 5);
|
size = AV_RL16(probe_packet->buf + 5);
|
||||||
|
|
||||||
if (size + 20 > probe_packet->buf_size)
|
if (size + 20 > probe_packet->buf_size)
|
||||||
return 3*AVPROBE_SCORE_MAX/2;
|
return AVPROBE_SCORE_MAX/4;
|
||||||
|
|
||||||
if (AV_RB32(probe_packet->buf+16+size) == NC_VIDEO_FLAG)
|
if (AV_RB32(probe_packet->buf+16+size) == NC_VIDEO_FLAG)
|
||||||
return AVPROBE_SCORE_MAX;
|
return AVPROBE_SCORE_MAX;
|
||||||
|
Loading…
Reference in New Issue
Block a user