Unified · Split
| @@ -20,12 +20,23 @@ · 19 unmodified lines | ||
| 20 | 20 | */ |
| 21 | 21 | |
| 22 | 22 | #include "libavutil/avassert.h" |
| 23 | +#include "libavutil/intreadwrite.h" | |
| 23 | 24 | #include "avformat.h" |
| 24 | 25 | #include "internal.h" |
| 25 | 26 | |
| 26 | 27 | static int musx_probe(const AVProbeData *p) |
| 27 | 28 | { |
| 28 | − if (memcmp(p->buf, "MUSX", 4)) | |
| 29 | + unsigned version; | |
| 30 | + | |
| 31 | + if (AV_RB32(p->buf) != MKBETAG('M','U','S','X')) | |
| 32 | + return 0; | |
| 33 | + | |
| 34 | + version = AV_RL32(p->buf + 8); | |
| 35 | + if (version != 10 && | |
| 36 | + version != 6 && | |
| 37 | + version != 5 && | |
| 38 | + version != 4 && | |
| 39 | + version != 201) | |
| 29 | 40 | return 0; |
| 30 | 41 | |
| 31 | 42 | return AVPROBE_SCORE_MAX / 5 * 2; |