Unified · Split
| @@ -20,12 +20,23 @@ · 19 unmodified lines | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | #include "libavutil/avassert.h" | 22 | #include "libavutil/avassert.h" |
| 23 | #include "libavutil/intreadwrite.h" | ||
| 23 | #include "avformat.h" | 24 | #include "avformat.h" |
| 24 | #include "internal.h" | 25 | #include "internal.h" |
| 25 | 26 | ||
| 26 | static int musx_probe(const AVProbeData *p) | 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 | return 0; | 40 | return 0; |
| 30 | 41 | ||
| 31 | return AVPROBE_SCORE_MAX / 5 * 2; | 42 | return AVPROBE_SCORE_MAX / 5 * 2; |