ffmpeg | branch: master | Paul B Mahol <[email protected]> | Tue Aug 15 21:37:12 
2023 +0200| [4d0a25d76085530a7017ae72d7d3eeab3fd6dad8] | committer: Paul B Mahol

avformat/soxdec: improve probe a little

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4d0a25d76085530a7017ae72d7d3eeab3fd6dad8
---

 libavformat/soxdec.c | 10 +++++++---
 1 file 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)

_______________________________________________
ffmpeg-cvslog mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".

Reply via email to