On 18/2/20 8:54 am, Moritz Barsnick wrote:
>
> On Mon, Feb 17, 2020 at 18:34:34 +0100, Carl Eugen Hoyos wrote:
>> Am 17.02.2020 um 10:49 schrieb Zane van Iperen <[email protected]>:
>>> There's no real "magic" fields to look for, hence why I set the `extensions`
>>> field. What would a probe function do in this case?
>>
>> I cannot look at the files right now:
>> Is there nothing that allows to distinguish them from random data?
>
> I wonder too why there should be no magic data. The header function
> already checks
>
> + if (vs12.magic != MKTAG('v', 's', '1', '2')) {
>
> and
>
> + if (avio_rl32(s->pb) != MKTAG('D', 'A', 'T', 'A'))
>
> Is this not magic? Is it not unique? Or at least a good hit justifying
> some score?
>
So, something like this?
#define APM_TAG_VS12 MKTAG('v', 's', '1', '2')
#define APM_TAG_DATA MKTAG('D', 'A', 'T', 'A')
static int apm_probe(const AVProbeData *p)
{
if (p->buf_size < 100)
return 0;
if (AV_RL32(p->buf + 20) != APM_TAG_VS12)
return 0;
if (AV_RL32(p->buf + 96) != APM_TAG_DATA)
return 0;
return AVPROBE_SCORE_EXTENSION + 1;
}
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> [email protected]
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> [email protected] with subject "unsubscribe".
>
Zane
_______________________________________________
ffmpeg-devel mailing list
[email protected]
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
[email protected] with subject "unsubscribe".