mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-24 12:21:15 +00:00
avformat/musx: improve probing
This commit is contained in:
parent
4cfe8123ea
commit
69e22e21e3
@ -20,12 +20,23 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "libavutil/avassert.h"
|
#include "libavutil/avassert.h"
|
||||||
|
#include "libavutil/intreadwrite.h"
|
||||||
#include "avformat.h"
|
#include "avformat.h"
|
||||||
#include "internal.h"
|
#include "internal.h"
|
||||||
|
|
||||||
static int musx_probe(const AVProbeData *p)
|
static int musx_probe(const AVProbeData *p)
|
||||||
{
|
{
|
||||||
if (memcmp(p->buf, "MUSX", 4))
|
unsigned version;
|
||||||
|
|
||||||
|
if (AV_RB32(p->buf) != MKBETAG('M','U','S','X'))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
version = AV_RL32(p->buf + 8);
|
||||||
|
if (version != 10 &&
|
||||||
|
version != 6 &&
|
||||||
|
version != 5 &&
|
||||||
|
version != 4 &&
|
||||||
|
version != 201)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
return AVPROBE_SCORE_MAX / 5 * 2;
|
return AVPROBE_SCORE_MAX / 5 * 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user