summaryrefslogtreecommitdiff
path: root/libavformat/soxdec.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2023-08-15 21:37:12 +0200
committerPaul B Mahol <onemda@gmail.com>2023-08-15 21:42:20 +0200
commit4d0a25d76085530a7017ae72d7d3eeab3fd6dad8 (patch)
tree477f50c8314d86f71ac941c8d9ae9d208f620233 /libavformat/soxdec.c
parent4b30aef4c08b9b5d13d0071a98f2f4eea6940ea4 (diff)
avformat/soxdec: improve probe a little
Diffstat (limited to 'libavformat/soxdec.c')
-rw-r--r--libavformat/soxdec.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/libavformat/soxdec.c b/libavformat/soxdec.c
index 10bea25232..4cfe7c7798 100644
--- a/libavformat/soxdec.c
+++ b/libavformat/soxdec.c
@@ -39,9 +39,13 @@
static int sox_probe(const AVProbeData *p)
{
- if (AV_RL32(p->buf) == SOX_TAG || AV_RB32(p->buf) == SOX_TAG)
- return AVPROBE_SCORE_MAX;
- return 0;
+ if (AV_RL32(p->buf) != SOX_TAG && AV_RB32(p->buf) != SOX_TAG)
+ return 0;
+ if (AV_RN32(p->buf+4) == 0)
+ return 0;
+ if (AV_RN32(p->buf+24) == 0)
+ return 0;
+ return AVPROBE_SCORE_MAX;
}
static int sox_read_header(AVFormatContext *s)