|
|
|
@ -25,6 +25,8 @@ |
|
|
|
|
#include "internal.h" |
|
|
|
|
#include "rawdec.h" |
|
|
|
|
|
|
|
|
|
#define LOAS_SYNC_WORD 0x2b7 |
|
|
|
|
|
|
|
|
|
static int loas_probe(AVProbeData *p) |
|
|
|
|
{ |
|
|
|
|
int max_frames = 0, first_frames = 0; |
|
|
|
@ -40,7 +42,7 @@ static int loas_probe(AVProbeData *p) |
|
|
|
|
|
|
|
|
|
for (frames = 0; buf2 < end; frames++) { |
|
|
|
|
uint32_t header = AV_RB24(buf2); |
|
|
|
|
if((header >> 13) != 0x2B7) |
|
|
|
|
if ((header >> 13) != LOAS_SYNC_WORD) |
|
|
|
|
break; |
|
|
|
|
fsize = (header & 0x1FFF) + 3; |
|
|
|
|
if (fsize < 7) |
|
|
|
@ -52,10 +54,15 @@ static int loas_probe(AVProbeData *p) |
|
|
|
|
if (buf == buf0) |
|
|
|
|
first_frames = frames; |
|
|
|
|
} |
|
|
|
|
if (first_frames>=3) return AVPROBE_SCORE_EXTENSION+1; |
|
|
|
|
else if(max_frames>100)return AVPROBE_SCORE_EXTENSION; |
|
|
|
|
else if(max_frames>=3) return AVPROBE_SCORE_EXTENSION / 2; |
|
|
|
|
else return 0; |
|
|
|
|
|
|
|
|
|
if (first_frames >= 3) |
|
|
|
|
return AVPROBE_SCORE_EXTENSION + 1; |
|
|
|
|
else if (max_frames > 100) |
|
|
|
|
return AVPROBE_SCORE_EXTENSION; |
|
|
|
|
else if (max_frames >= 3) |
|
|
|
|
return AVPROBE_SCORE_EXTENSION / 2; |
|
|
|
|
else |
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
static int loas_read_header(AVFormatContext *s) |
|
|
|
|